A helper component for optimizing image processing in Unity by managing frame skipping and downscaling operations. v1.1.1.
More...
|
virtual void | Dispose () |
| To release the resources for the initialized method.
|
|
virtual Mat | GetDownScaleMat (Mat originalMat) |
| Gets the mat that downscaled the original mat. if downscaleRatio == 1 , return originalMat.
|
|
virtual bool | IsCurrentFrameSkipped () |
| Indicates whether the current frame is skipped.
|
|
A helper component for optimizing image processing in Unity by managing frame skipping and downscaling operations. v1.1.1.
The ImageOptimizationHelper class provides utilities to enhance performance during image processing tasks. It includes features such as:
-
Downscaling images to reduce computational load
-
Skipping frames to optimize processing frequency
This class is particularly useful when working with high-resolution images or real-time processing where performance is a priority.
Attach this component to a GameObject to enable image optimization:
imageHelper.downscaleRatio = 2.0f;
imageHelper.frameSkippingRatio = 3;
{
}
n-dimensional dense array class
Definition Mat_ValueTuple.cs:11
A helper component for optimizing image processing in Unity by managing frame skipping and downscalin...
Definition ImageOptimizationHelper.cs:40
virtual Mat GetDownScaleMat(Mat originalMat)
Gets the mat that downscaled the original mat. if downscaleRatio == 1 , return originalMat.
Definition ImageOptimizationHelper.cs:100
virtual bool IsCurrentFrameSkipped()
Indicates whether the current frame is skipped.
Definition ImageOptimizationHelper.cs:87
◆ Dispose()
virtual void OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.Dispose |
( |
| ) |
|
|
virtual |
To release the resources for the initialized method.
◆ GetDownScaleMat()
virtual Mat OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.GetDownScaleMat |
( |
Mat | originalMat | ) |
|
|
virtual |
Gets the mat that downscaled the original mat. if downscaleRatio == 1 , return originalMat.
- Returns
- The downscale mat.
- Parameters
-
◆ IsCurrentFrameSkipped()
virtual bool OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.IsCurrentFrameSkipped |
( |
| ) |
|
|
virtual |
Indicates whether the current frame is skipped.
- Returns
true
, if the current frame is skipped, false
otherwise.
◆ OnValidate()
void OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.OnValidate |
( |
| ) |
|
|
protected |
◆ _downscaleRatio
float OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper._downscaleRatio = 2f |
|
protected |
◆ _frameSkippingRatio
int OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper._frameSkippingRatio = 2 |
|
protected |
◆ downScaleFrameMat
Mat OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.downScaleFrameMat |
|
protected |
◆ frameCount
int OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.frameCount = 0 |
|
protected |
◆ downscaleRatio
virtual float OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.downscaleRatio |
|
getset |
◆ frameSkippingRatio
virtual int OpenCVForUnity.UnityUtils.Helper.ImageOptimizationHelper.frameSkippingRatio |
|
getset |
The frame skipping ratio.
The documentation for this class was generated from the following file: