public class DnnSuperResImpl extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
nativeObj |
Modifier | Constructor and Description |
---|---|
protected |
DnnSuperResImpl(long addr) |
Modifier and Type | Method and Description |
---|---|
static DnnSuperResImpl |
__fromPtr__(long addr) |
static DnnSuperResImpl |
create()
Empty constructor for python
|
protected void |
finalize() |
String |
getAlgorithm()
Returns the scale factor of the model:
|
long |
getNativeObjAddr() |
int |
getScale()
Returns the scale factor of the model:
|
void |
readModel(String path)
Read the model from the given path
|
void |
setModel(String algo,
int scale)
Set desired model
|
void |
setPreferableBackend(int backendId)
Set computation backend
|
void |
setPreferableTarget(int targetId)
Set computation target
|
void |
upsample(Mat img,
Mat result)
Upsample via neural network
|
void |
upsampleMultioutput(Mat img,
List<Mat> imgs_new,
MatOfInt scale_factors,
List<String> node_names)
Upsample via neural network of multiple outputs
|
public long getNativeObjAddr()
public static DnnSuperResImpl __fromPtr__(long addr)
public static DnnSuperResImpl create()
public void readModel(String path)
path
- Path to the model file.public void setModel(String algo, int scale)
algo
- String containing one of the desired models:
scale
- Integer specifying the upscale factorpublic void setPreferableBackend(int backendId)
backendId
- automatically generatedpublic void setPreferableTarget(int targetId)
targetId
- automatically generatedpublic void upsample(Mat img, Mat result)
img
- Image to upscaleresult
- Destination upscaled imagepublic void upsampleMultioutput(Mat img, List<Mat> imgs_new, MatOfInt scale_factors, List<String> node_names)
img
- Image to upscaleimgs_new
- Destination upscaled imagesscale_factors
- Scaling factors of the output nodesnode_names
- Names of the output nodes in the neural networkpublic int getScale()
public String getAlgorithm()
Copyright © 2024. All rights reserved.