All Downloads are FREE. Search and download functionalities are using the official Maven repository.

boofcv.abst.tracker.ConfigCirculantTracker Maven / Gradle / Ivy

/*
 * Copyright (c) 2021, Peter Abeles. All Rights Reserved.
 *
 * This file is part of BoofCV (http://boofcv.org).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package boofcv.abst.tracker;

import boofcv.struct.Configuration;

/**
 * Configuration for {@link boofcv.alg.tracker.circulant.CirculantTracker}.
 *
 * @author Peter Abeles
 */
public class ConfigCirculantTracker implements Configuration {
	/**
	 * Spatial bandwidth. Proportional to target size.
	 */
	public double output_sigma_factor = 1.0/16.0;
	/**
	 *  gaussian kernel bandwidth
	 */
	public double sigma = 0.2;
	/**
	 * Regularization term.
	 */
	public double lambda = 1e-2;
	/**
	 * Weighting factor mixing old track image and new one. Effectively adjusts the rate at which it can adjust
	 * to changes in appearance. Values closer to zero slow down the rate of change. 0f is no update.
	 * 0.075f is recommended.
	 */
	public double interp_factor = 0.075;
	/**
	 * Maximum pixel value. Used to normalize image. 8-bit images are 255
	 */
	public double maxPixelValue = 255.0;

	/**
	 * How much padding is added around the region requested by the user. Specified as fraction of original image.
	 * Padding of 1 = 2x original size.
	 */
	public double padding = 1;

	/**
	 * Length of size in work space image. A total of N*N points are sampled. Should be set to a power of two
	 * to maximize speed. In general, larger numbers are more stable but slower.
	 */
	public int workSpace = 64;

	public ConfigCirculantTracker(float interp_factor) {
		this.interp_factor = interp_factor;
	}

	public ConfigCirculantTracker() {}

	public ConfigCirculantTracker setTo( ConfigCirculantTracker src ) {
		this.output_sigma_factor = src.output_sigma_factor;
		this.sigma = src.sigma;
		this.lambda = src.lambda;
		this.interp_factor = src.interp_factor;
		this.maxPixelValue = src.maxPixelValue;
		this.padding = src.padding;
		this.workSpace = src.workSpace;
		return this;
	}

	@Override public void checkValidity() {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy