ImageEn, unit ievision

TIEVisionNNetSuperRes.upsample

TIEVisionNNetSuperRes.upsample


Declaration

function upsample(image: TIEVisionImage): TIEVisionImage; safecall;


Description

Increases the resolution of the specified image by a factor related to the loaded model (upscaling).
The model determines the level of upscaling that is performed (2x, 4x, etc).

Parameter Description
image Input image

Original


Upscaled 3x using FSRCNN


Compared with Bicubic Upscaling



Example

// Increase the image resolution by a factor of three using FSRCNN pretrained model
var
  nnet: TIEVisionNNetSuperRes;
  img: TIEVisionImage;
begin
  nnet:= IEVisionLib.createNNetSuperRes(ievFSRCNN, 3, 'FSRCNN_x3.pb');
  img := nnet.upsample(ImageEnView1.IEBitmap.GetIEVisionImage());
  ImageEnView1.IEBitmap.AssignIEVisionImage(img);
  ImageEnView1.Update();
end;