本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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();
}
}
示例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;
}