当前位置: 首页>>代码示例>>Java>>正文


Java SpecializedOps.subvector方法代码示例

本文整理汇总了Java中org.ejml.ops.SpecializedOps.subvector方法的典型用法代码示例。如果您正苦于以下问题:Java SpecializedOps.subvector方法的具体用法?Java SpecializedOps.subvector怎么用?Java SpecializedOps.subvector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ejml.ops.SpecializedOps的用法示例。


在下文中一共展示了SpecializedOps.subvector方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: computeH

import org.ejml.ops.SpecializedOps; //导入方法依赖的package包/类
/**
 * Computes the SVD of A and extracts the homography matrix from its null space
 */
protected boolean computeH(DenseMatrix64F A, DenseMatrix64F H) {
	if( !svd.decompose(A) )
		return true;

	if( A.numRows > 8 )
		SingularOps.nullVector(svd,true,H);
	else {
		// handle a special case since the matrix only has 8 singular values and won't select
		// the correct column
		DenseMatrix64F V = svd.getV(null,false);
		SpecializedOps.subvector(V, 0, 8, V.numCols, false, 0, H);
	}

	return false;
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:19,代码来源:HomographyLinear4.java

示例2: process

import org.ejml.ops.SpecializedOps; //导入方法依赖的package包/类
/**
 * Computes the SVD of A and extracts the essential/fundamental matrix from its null space
 */
protected boolean process(DenseMatrix64F A, DenseMatrix64F F ) {
	if( !svdNull.decompose(A) )
		return true;

	if( A.numRows > 8 )
		SingularOps.nullVector(svdNull,true,F);
	else {
		// handle a special case since the matrix only has 8 singular values and won't select
		// the correct column
		DenseMatrix64F V = svdNull.getV(null,false);
		SpecializedOps.subvector(V, 0, 8, V.numCols, false, 0, F);
	}

	return false;
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:19,代码来源:FundamentalLinear8.java

示例3: extractVector

import org.ejml.ops.SpecializedOps; //导入方法依赖的package包/类
/**
 * See {@link org.ejml.simple.SimpleBase#extractVector(boolean extractRow, int element)}
 */
public NinjaMatrix extractVector(boolean extractRow, int element) {
    int length = extractRow ? numCols() : numRows();
    NinjaMatrix result = extractRow ? new NinjaMatrix(1, length) : new NinjaMatrix(length, 1);
    if (extractRow) {
        SpecializedOps.subvector(this.data, element, 0, length, true, 0, result.data);
    } else {
        SpecializedOps.subvector(this.data, 0, element, length, false, 0, result.data);
    }
    return result;
}
 
开发者ID:yuval,项目名称:ninja,代码行数:14,代码来源:NinjaMatrix.java

示例4: process

import org.ejml.ops.SpecializedOps; //导入方法依赖的package包/类
/**
 * Given a set of homographies computed from a sequence of images that observe the same
 * plane it estimates the camera's calibration.
 *
 * @param homographies Homographies computed from observations of the calibration grid.
 */
public void process( List<DenseMatrix64F> homographies ) {
	if( assumeZeroSkew ) {
		if( homographies.size() < 2 )
			throw new IllegalArgumentException("At least two homographies are required");
	} else if( homographies.size() < 3 ) {
		throw new IllegalArgumentException("At least three homographies are required");
	}

	if( assumeZeroSkew ) {
		setupA_NoSkew(homographies);
		if( !svd.decompose(A) )
			throw new RuntimeException("SVD failed");
		if( homographies.size() == 2 ) {
			DenseMatrix64F V = svd.getV(null,false);
			SpecializedOps.subvector(V, 0, 4, V.numRows, false, 0, b);
		} else {
			SingularOps.nullVector(svd,true,b);
		}
		computeParam_ZeroSkew();
	} else {
		setupA(homographies);
		if( !svd.decompose(A) )
			throw new RuntimeException("SVD failed");
		SingularOps.nullVector(svd,true,b);
		computeParam();
	}
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:34,代码来源:Zhang99CalibrationMatrixFromHomographies.java

示例5: process

import org.ejml.ops.SpecializedOps; //导入方法依赖的package包/类
/**
 * Computes the SVD of A and extracts the essential/fundamental matrix from its null space
 */
private boolean process(DenseMatrix64F A) {
	if( !svdNull.decompose(A) )
		return false;

	// extract the two singular vectors
	// no need to sort by singular values because the two automatic null spaces are being sampled
	svdNull.getV(V,false);
	SpecializedOps.subvector(V, 0, 7, 9, false, 0, F1);
	SpecializedOps.subvector(V, 0, 8, 9, false, 0, F2);

	return true;
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:16,代码来源:FundamentalLinear7.java


注:本文中的org.ejml.ops.SpecializedOps.subvector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。