diff options
author | mbansal <mayank.bansal@sri.com> | 2011-09-21 14:19:17 -0400 |
---|---|---|
committer | Wei-Ta Chen <weita@google.com> | 2011-09-22 16:59:27 -0700 |
commit | dd28e1cc00373c02adf88dff878dbbe5d8be9e59 (patch) | |
tree | 3d51207c4c12c5b9067c71e7b29d00d1732e0a1f /src/com/android/camera/panorama/MosaicFrameProcessor.java | |
parent | b2563be21745e389218655625f42802edc911088 (diff) | |
download | LegacyCamera-dd28e1cc00373c02adf88dff878dbbe5d8be9e59.zip LegacyCamera-dd28e1cc00373c02adf88dff878dbbe5d8be9e59.tar.gz LegacyCamera-dd28e1cc00373c02adf88dff878dbbe5d8be9e59.tar.bz2 |
Updates to handle textureless scenes during capture.
1) Starts stitching only when the camera sees a textured scene at the beginning.
2) If a texturess scene is encountered in the middle of a capture, the stitching continues with the intermediate frames translated using the pan velocity estimate.
3) Added more error codes and percolated them up to the java layer.
4) Fix a build error in Mosaic::addFrame() and added comments.
5) Update the javadoc in Mosaic.java to reflect the new returning codes.
Change-Id: I7727ace615ece22adefe313a19ac2cbe8c8d21a8
Diffstat (limited to 'src/com/android/camera/panorama/MosaicFrameProcessor.java')
-rw-r--r-- | src/com/android/camera/panorama/MosaicFrameProcessor.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/panorama/MosaicFrameProcessor.java b/src/com/android/camera/panorama/MosaicFrameProcessor.java index 54fc7b8..7660f5e 100644 --- a/src/com/android/camera/panorama/MosaicFrameProcessor.java +++ b/src/com/android/camera/panorama/MosaicFrameProcessor.java @@ -26,6 +26,7 @@ public class MosaicFrameProcessor { private static final String TAG = "MosaicFrameProcessor"; private static final int NUM_FRAMES_IN_BUFFER = 2; private static final int MAX_NUMBER_OF_FRAMES = 100; + private static final int MOSAIC_RET_CODE_INDEX = 10; private static final int FRAME_COUNT_INDEX = 9; private static final int X_COORD_INDEX = 2; private static final int Y_COORD_INDEX = 5; @@ -184,6 +185,7 @@ public class MosaicFrameProcessor { public void calculateTranslationRate(long now) { float[] frameData = mMosaicer.setSourceImageFromGPU(); + int ret_code = (int) frameData[MOSAIC_RET_CODE_INDEX]; mTotalFrameCount = (int) frameData[FRAME_COUNT_INDEX]; float translationCurrX = frameData[X_COORD_INDEX]; float translationCurrY = frameData[Y_COORD_INDEX]; |