1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468)

This commit is contained in:
Vitaly Tuzov
2017-12-13 15:00:38 +03:00
committed by Vadim Pisarevsky
parent 84ee4d701a
commit 51cb56ef2c
57 changed files with 1300 additions and 112 deletions
@@ -159,7 +159,7 @@ public class ColorBlobDetectionActivity extends Activity implements OnTouchListe
mDetector.setHsvColor(mBlobColorHsv);
Imgproc.resize(mDetector.getSpectrum(), mSpectrum, SPECTRUM_SIZE);
Imgproc.resize(mDetector.getSpectrum(), mSpectrum, SPECTRUM_SIZE, 0, 0, Imgproc.INTER_LINEAR_EXACT);
mIsColorSelected = true;
@@ -286,7 +286,7 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
case ImageManipulationsActivity.VIEW_MODE_ZOOM:
Mat zoomCorner = rgba.submat(0, rows / 2 - rows / 10, 0, cols / 2 - cols / 10);
Mat mZoomWindow = rgba.submat(rows / 2 - 9 * rows / 100, rows / 2 + 9 * rows / 100, cols / 2 - 9 * cols / 100, cols / 2 + 9 * cols / 100);
Imgproc.resize(mZoomWindow, zoomCorner, zoomCorner.size());
Imgproc.resize(mZoomWindow, zoomCorner, zoomCorner.size(), 0, 0, Imgproc.INTER_LINEAR_EXACT);
Size wsize = mZoomWindow.size();
Imgproc.rectangle(mZoomWindow, new Point(1, 1), new Point(wsize.width - 2, wsize.height - 2), new Scalar(255, 0, 0, 255), 2);
zoomCorner.release();