ImageEn, unit ievision

TIEVisionStitcher.stitch

TIEVisionStitcher.stitch

Declaration

function stitch(images: TIEVisionVectorImageRef; out status: TIEVisionStitchingStatus; deterministic: bool32 = true): TIEVisionImage; safecall;

Description

Tries to stitch the given images.
Parameter Description
images Input images
status Status code
deterministic The stitcher algorithm is based on RANSAC, which uses a random generator to find the best matches. This method gives a different result each time. If deterministic is true, this feature is disabled and you should get a consistent result each time Stitch is called

Note:
Stitching is randomized each time stitch is called, so you may need to call it multiple times to get a desirable result
If you encountering failures (particularly ievSSERR_NEED_MORE_IMGS), ensure that your source images contain enough overlapping content. Try lowering the threshold to be more accepting of results
ievSSERR_CAMERA_PARAMS_ADJUST_FAIL typically occurs when trying to stitch scanned images in panoramic mode, so ensure you set ievSTITCH_SCAN mode when creating the stitcher. Also try increasing the registration resolution
Also see JoinBitmaps which allows joining of two images with overlap support
A shortcut method for this is available: StitchImages

Demo

Demo  Demos\IEVision\Stitcher\Stitcher.dpr

Example

var
  images: TIEVisionVectorImageRef;
  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'));

  pano := IEVisionLib.createStitcher().stitch(images, status);

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

See Also

createStitcher