Class RefineTwoViewPinholeRotation

java.lang.Object
boofcv.alg.geo.selfcalib.RefineTwoViewPinholeRotation
All Implemented Interfaces:
VerbosePrint

public class RefineTwoViewPinholeRotation extends Object implements VerbosePrint

Non-linear refinement of intrinsics and rotation while under pure rotation given two views and associated features. The two views can have coupled or independent intrinsic parameters, i.e. they were taken using the same camera or not.

WARNING: Results can be physically impossible but have a low residual. This is an unconstrained optimization and there is nothing stopping it from selecting negative focal lengths or centers outside the image. Typically this is an indication that there was not pure rotation.

WARNING: More thought needs to be put into the theory. When given imperfect initial conditions by perfect observations it will converge to having zero error but warped intrinsic parameters. Rotation will be surprisingly accurate. There are probably additional constraints that need to be taken in account but are not.

  • Field Details

  • Constructor Details

    • RefineTwoViewPinholeRotation

      public RefineTwoViewPinholeRotation()
  • Method Details

    • refine

      public boolean refine(List<AssociatedPair> associatedPixels, DMatrixRMaj rotation, CameraPinhole intrinsic1, CameraPinhole intrinsic2)
      Refines the provided parameters. Inputs are only modified if it returns true. If two views are specified but there's a single view assumption then only the first view is used.
      Parameters:
      associatedPixels - (Input) Matches image features between the two views. Pixels.
      rotation - (Input/Output) Initial estimate of rotation. Results are written to it.
      intrinsic1 - (Input/Output) Initial estimate of intrinsic1. Results are written to it.
      intrinsic2 - (Input/Output) Initial estimate of intrinsic2. Results are written to it.
      Returns:
      true if it thinks it has a valid solution. False if it knows it failed.
    • setVerbose

      public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration)
      Specified by:
      setVerbose in interface VerbosePrint