Search in sources :

Example 1 with PairLineNorm

use of boofcv.struct.geo.PairLineNorm in project BoofCV by lessthanoptimal.

the class TestMultiViewOps method homographyStereo2Lines.

@Test
public void homographyStereo2Lines() {
    CommonHomographyInducedPlane common = new CommonHomographyInducedPlane();
    PairLineNorm l1 = CommonHomographyInducedPlane.convert(common.p1, common.p2);
    PairLineNorm l2 = CommonHomographyInducedPlane.convert(common.p1, common.p3);
    DMatrixRMaj H = MultiViewOps.homographyStereo2Lines(common.F, l1, l2);
    common.checkHomography(H);
}
Also used : CommonHomographyInducedPlane(boofcv.alg.geo.h.CommonHomographyInducedPlane) DMatrixRMaj(org.ejml.data.DMatrixRMaj) PairLineNorm(boofcv.struct.geo.PairLineNorm) Test(org.junit.Test)

Example 2 with PairLineNorm

use of boofcv.struct.geo.PairLineNorm in project BoofCV by lessthanoptimal.

the class CommonHomographyInducedPlane method convert.

public static PairLineNorm convert(AssociatedPair x1, AssociatedPair x2) {
    PairLineNorm ret = new PairLineNorm();
    GeometryMath_F64.cross(x1.p1, x2.p1, ret.l1);
    GeometryMath_F64.cross(x1.p2, x2.p2, ret.l2);
    return ret;
}
Also used : PairLineNorm(boofcv.struct.geo.PairLineNorm)

Example 3 with PairLineNorm

use of boofcv.struct.geo.PairLineNorm in project BoofCV by lessthanoptimal.

the class TestHomographyInducedStereo2Line method perfectData.

@Test
public void perfectData() {
    PairLineNorm l1 = convert(p1, p2);
    PairLineNorm l2 = convert(p1, p3);
    HomographyInducedStereo2Line alg = new HomographyInducedStereo2Line();
    alg.setFundamental(F, e2);
    assertTrue(alg.process(l1, l2));
    checkHomography(alg.getHomography());
}
Also used : PairLineNorm(boofcv.struct.geo.PairLineNorm) Test(org.junit.Test)

Example 4 with PairLineNorm

use of boofcv.struct.geo.PairLineNorm in project BoofCV by lessthanoptimal.

the class TestHomographyInducedStereoLinePt method perfectData.

@Test
public void perfectData() {
    PairLineNorm l1 = convert(p1, p2);
    HomographyInducedStereoLinePt alg = new HomographyInducedStereoLinePt();
    alg.setFundamental(F, e2);
    alg.process(l1, p3);
    checkHomography(alg.getHomography());
}
Also used : PairLineNorm(boofcv.struct.geo.PairLineNorm) Test(org.junit.Test)

Example 5 with PairLineNorm

use of boofcv.struct.geo.PairLineNorm in project BoofCV by lessthanoptimal.

the class TestMultiViewOps method homographyStereoLinePt.

@Test
public void homographyStereoLinePt() {
    CommonHomographyInducedPlane common = new CommonHomographyInducedPlane();
    PairLineNorm l1 = CommonHomographyInducedPlane.convert(common.p1, common.p2);
    DMatrixRMaj H = MultiViewOps.homographyStereoLinePt(common.F, l1, common.p3);
    common.checkHomography(H);
}
Also used : CommonHomographyInducedPlane(boofcv.alg.geo.h.CommonHomographyInducedPlane) DMatrixRMaj(org.ejml.data.DMatrixRMaj) PairLineNorm(boofcv.struct.geo.PairLineNorm) Test(org.junit.Test)

Aggregations

PairLineNorm (boofcv.struct.geo.PairLineNorm)5 Test (org.junit.Test)4 CommonHomographyInducedPlane (boofcv.alg.geo.h.CommonHomographyInducedPlane)2 DMatrixRMaj (org.ejml.data.DMatrixRMaj)2