TIEVisionLibrary.createNNetSuperRes
Declaration
function createNNetSuperRes(model: TIEVisionSuperResModel; scale: int32_t; modelPath: PAnsiChar; configPath: PAnsiChar): TIEVisionNNetSuperRes; safecall;
function createNNetSuperRes(model: TIEVisionSuperResModel; scale: int32_t modelPath: PAnsiChar): TIEVisionNNetSuperRes; safecall;
Description
Create an
TIEVisionSuperResModel instance to upscale images (i.e. increase image resolution).
See
createNNet for the supported models.
Neural net supported types are: EDSR, ESPCN, FSRCNN, LapSRN
Parameter | Description |
model | Model type |
scale | Scale factor. This parameter must be tied to the specified model |
modelPath | Path to the input mdoel |
configPath | Optional path to the condiguration file |
You can download model files from:
www.imageen.com/download/See model comparisons and benchmarks at:
www.imageen.com/support/SuperRes_Benchmarking/More information on Super Resolution at:
learnopencv.com/super-resolution-in-opencv/Original Image:Upscaled 3x using FSRCNN:Compared with Bicubic Upscaling: | Demos\IEVision\NeuralNet\NeuralNet.dpr |
// Increase the image resolution by a factor of three using FSRCNN pre-trained 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;