Package org.opencv.dnn
Class Image2BlobParams
- java.lang.Object
-
- org.opencv.dnn.Image2BlobParams
-
public class Image2BlobParams extends java.lang.Object
Processing params of image to blob. It includes all possible image processing operations and corresponding parameters. SEE: blobFromImageWithParams Note: The order and usage ofscalefactor
andmean
are (input - mean) * scalefactor. The order and usage ofscalefactor
,size
,mean
,swapRB
, andddepth
are consistent with the function of REF: blobFromImage.
-
-
Field Summary
Fields Modifier and Type Field Description protected long
nativeObj
-
Constructor Summary
Constructors Modifier Constructor Description Image2BlobParams()
protected
Image2BlobParams(long addr)
Image2BlobParams(Scalar scalefactor)
Image2BlobParams(Scalar scalefactor, Size size)
Image2BlobParams(Scalar scalefactor, Size size, Scalar mean)
Image2BlobParams(Scalar scalefactor, Size size, Scalar mean, boolean swapRB)
Image2BlobParams(Scalar scalefactor, Size size, Scalar mean, boolean swapRB, int ddepth)
Image2BlobParams(Scalar scalefactor, Size size, Scalar mean, boolean swapRB, int ddepth, Scalar borderValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Image2BlobParams
__fromPtr__(long addr)
void
blobRectsToImageRects(MatOfRect rBlob, MatOfRect rImg, Size size)
Get rectangle coordinates in original image system from rectangle in blob coordinates.Rect
blobRectToImageRect(Rect rBlob, Size size)
Get rectangle coordinates in original image system from rectangle in blob coordinates.protected void
finalize()
Scalar
get_borderValue()
int
get_ddepth()
Scalar
get_mean()
Scalar
get_scalefactor()
Size
get_size()
boolean
get_swapRB()
long
getNativeObjAddr()
void
set_borderValue(Scalar borderValue)
void
set_ddepth(int ddepth)
void
set_mean(Scalar mean)
void
set_scalefactor(Scalar scalefactor)
void
set_size(Size size)
void
set_swapRB(boolean swapRB)
-
-
-
Constructor Detail
-
Image2BlobParams
protected Image2BlobParams(long addr)
-
Image2BlobParams
public Image2BlobParams()
-
Image2BlobParams
public Image2BlobParams(Scalar scalefactor, Size size, Scalar mean, boolean swapRB, int ddepth, Scalar borderValue)
-
Image2BlobParams
public Image2BlobParams(Scalar scalefactor, Size size, Scalar mean, boolean swapRB, int ddepth)
-
Image2BlobParams
public Image2BlobParams(Scalar scalefactor, Size size, Scalar mean, boolean swapRB)
-
Image2BlobParams
public Image2BlobParams(Scalar scalefactor)
-
-
Method Detail
-
getNativeObjAddr
public long getNativeObjAddr()
-
__fromPtr__
public static Image2BlobParams __fromPtr__(long addr)
-
blobRectToImageRect
public Rect blobRectToImageRect(Rect rBlob, Size size)
Get rectangle coordinates in original image system from rectangle in blob coordinates.- Parameters:
rBlob
- rect in blob coordinates.size
- original input image size.- Returns:
- rectangle in original image coordinates.
-
blobRectsToImageRects
public void blobRectsToImageRects(MatOfRect rBlob, MatOfRect rImg, Size size)
Get rectangle coordinates in original image system from rectangle in blob coordinates.- Parameters:
rBlob
- rect in blob coordinates.rImg
- result rect in image coordinates.size
- original input image size.
-
get_scalefactor
public Scalar get_scalefactor()
-
set_scalefactor
public void set_scalefactor(Scalar scalefactor)
-
get_size
public Size get_size()
-
set_size
public void set_size(Size size)
-
get_mean
public Scalar get_mean()
-
set_mean
public void set_mean(Scalar mean)
-
get_swapRB
public boolean get_swapRB()
-
set_swapRB
public void set_swapRB(boolean swapRB)
-
get_ddepth
public int get_ddepth()
-
set_ddepth
public void set_ddepth(int ddepth)
-
get_borderValue
public Scalar get_borderValue()
-
set_borderValue
public void set_borderValue(Scalar borderValue)
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-