private float mBuff[];
private Mat mRgbaInnerWindow;
private Mat mGrayInnerWindow;
- private Mat mBlurWindow;
private Mat mZoomWindow;
private Mat mZoomCorner;
private Mat mSepiaKernel;
if (mGrayInnerWindow == null && !mGray.empty())
mGrayInnerWindow = mGray.submat(top, top + height, left, left + width);
- if (mBlurWindow == null)
- mBlurWindow = mRgba.submat(0, rows, cols / 3, cols * 2 / 3);
-
if (mZoomCorner == null)
mZoomCorner = mRgba.submat(0, rows / 2 - rows / 10, 0, cols / 2 - cols / 10);
mZoomWindow.release();
if (mZoomCorner != null)
mZoomCorner.release();
- if (mBlurWindow != null)
- mBlurWindow.release();
if (mGrayInnerWindow != null)
mGrayInnerWindow.release();
if (mRgbaInnerWindow != null)
mIntermediateMat = null;
mRgbaInnerWindow = null;
mGrayInnerWindow = null;
- mBlurWindow = null;
mZoomCorner = null;
mZoomWindow = null;
}
break;
case ImageManipulationsActivity.VIEW_MODE_SEPIA:
- Core.transform(mRgba, mRgba, mSepiaKernel);
+ if ((mRgbaInnerWindow == null) || (mRgba.cols() != mSizeRgba.width) || (mRgba.height() != mSizeRgba.height))
+ CreateAuxiliaryMats();
+ Core.transform(mRgbaInnerWindow, mRgbaInnerWindow, mSepiaKernel);
break;
case ImageManipulationsActivity.VIEW_MODE_ZOOM: