Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d1cad51 authored by Mark Harman's avatar Mark Harman
Browse files

Fix crash for panorama if no matches found when aligning images.

parent 390cba71
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@
Version 1.47.1 (Work in progress)

FIXED   Crash in 1.47 when saving photo with SAF and geotagging, when using Camera2 API.
FIXED   Crash for panorama if no matches found when aligning images.

Version 1.47 (2019/08/14)

+17 −0
Original line number Diff line number Diff line
@@ -1406,6 +1406,23 @@ public class PanoramaProcessor {
        if( MyDebug.LOG )
            Log.d(TAG, "### autoAlignmentByFeature: time after choosing best matches: " + (System.currentTimeMillis() - time_s));

        if( actual_matches.size() == 0 ) {
            if( MyDebug.LOG )
                Log.d(TAG, "no matches!");
			/*if( true )
				throw new RuntimeException();*/

            // free allocations
            for(int i=0;i<allocations.length;i++) {
                if( allocations[i] != null ) {
                    allocations[i].destroy();
                    allocations[i] = null;
                }
            }

            return new AutoAlignmentByFeatureResult(0, 0, 0.0f, 1.0f);
        }

        final boolean use_ransac = true;
        //final boolean use_ransac = false;
        //final boolean estimate_rotation = false;