ImageEn, unit ievision

TIEVisionStitcher.setCompositingResol

TIEVisionStitcher.setCompositingResol


Declaration

procedure setCompositingResol(value: double);


Description

Specify a resolution to resize images when composing the panorama (creating the final stitched image).
The value will be a megapixel ratio in the range 0.01..1.0, e.g. 0.5 means the image will be scaled to around 0.5 megapixels.
You can specify -1 to use the original resolution.

Default: -1


Resolution Parameters

There are three stages to stitching:
1. Registration: Finding and matching features in the images, finding camera parameters
2. Seaming: Finding the seams between images, calculating exposure compensation
3. Composition: Creating the final stitched images (seaming, applying exposure and blending)

To speed up processing you can:
 Scale the image used for the registration step using setRegistrationResol (defaults to 0.6). This will not reduce the resolution of the final image (though may affect the accuracy of the stitching)
 Scale the image used for the seaming step using setSeamEstimationResol (defaults to 0.1). This will not reduce the resolution of the final image (though may affect the accuracy of the stitching)
 Scale the composed image (i.e. the stitched result) by setting setCompositingResol (defaults to -1, which maintains the original resolution)


Demo

Demo  Demos\IEVision\Stitcher\Stitcher.dpr


Example

const
  ORIG_RESOL = -1;
var
  images: TIEVisionVectorImageRef;
  stitcher: TIEVisionStitcher;
  pano: TIEVisionImage;
  status: TIEVisionStitchingStatus;
begin
  images := IEVisionLib.createVectorImageRef();
  images.push_back(IEVisionLib.createImage('image1.jpg'));
  images.push_back(IEVisionLib.createImage('image2.jpg'));
  images.push_back(IEVisionLib.createImage('image3.jpg'));

  stitcher := IEVisionLib.createStitcher( False, ievSTITCH_PANORAMA );

  // Set parameters
  stitcher.setRegistrationResol( 0.6 );
  stitcher.setSeamEstimationResol( 0.1 );
  stitcher.setCompositingResol( ORIG_RESOL );
  stitcher.setPanoConfidenceThresh( 0.7 );
  stitcher.setInterpolationFlags( ievLINEAR );
  stitcher.setWaveCorrection( True );
  stitcher.setWaveCorrectKind( ievAUTO );

  pano := stitcher.stitch(images, status);

  if status = ievSSOK then
    ImageEnView1.IEBitmap.AssignIEVisionImage(pano);
end;


See Also

 createStitcher
 stitch