summaryrefslogtreecommitdiffstats
path: root/jni/feature_stab/src
diff options
context:
space:
mode:
authormbansal <mayank.bansal@sri.com>2011-09-21 14:19:17 -0400
committerWei-Ta Chen <weita@google.com>2011-09-22 16:59:27 -0700
commitdd28e1cc00373c02adf88dff878dbbe5d8be9e59 (patch)
tree3d51207c4c12c5b9067c71e7b29d00d1732e0a1f /jni/feature_stab/src
parentb2563be21745e389218655625f42802edc911088 (diff)
downloadLegacyCamera-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 'jni/feature_stab/src')
-rw-r--r--jni/feature_stab/src/dbreg/dbreg.cpp2
-rw-r--r--jni/feature_stab/src/dbreg/dbreg.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/jni/feature_stab/src/dbreg/dbreg.cpp b/jni/feature_stab/src/dbreg/dbreg.cpp
index fb42838..dc7d58f 100644
--- a/jni/feature_stab/src/dbreg/dbreg.cpp
+++ b/jni/feature_stab/src/dbreg/dbreg.cpp
@@ -344,7 +344,7 @@ bool db_FrameToReferenceRegistration::NeedReferenceUpdate()
int db_FrameToReferenceRegistration::AddFrame(const unsigned char * const * im, double H[9],bool force_reference,bool prewarp)
{
m_current_is_reference = false;
- if(!m_reference_set)
+ if(!m_reference_set || force_reference)
{
db_Identity3x3(m_H_ref_to_ins);
db_Copy9(H,m_H_ref_to_ins);
diff --git a/jni/feature_stab/src/dbreg/dbreg.h b/jni/feature_stab/src/dbreg/dbreg.h
index 92cd0e3..4eb2444 100644
--- a/jni/feature_stab/src/dbreg/dbreg.h
+++ b/jni/feature_stab/src/dbreg/dbreg.h
@@ -222,6 +222,11 @@ public:
int GetNrMatches() { return m_nr_matches; }
/*!
+ * Returns the number of corners detected in the current reference image.
+ */
+ int GetNrRefCorners() { return m_nr_corners_ref; }
+
+ /*!
* Returns the pointer to an array of indices that were found to be RANSAC inliers from the matched corner lists.
*/
int* GetInliers() { return m_inlier_indices; }