lxy 2 rokov pred
rodič
commit
f36bb99590
29 zmenil súbory, kde vykonal 796 pridanie a 2408 odobranie
  1. BIN
      Demo.xcworkspace/xcuserdata/lr.xcuserdatad/UserInterfaceState.xcuserstate
  2. 207 47
      Demo.xcworkspace/xcuserdata/lr.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 1 1
      Podfile.lock
  4. 0 1
      Pods/Headers/Private/LenzCameraNativeModuleForRN/LenStitcher.h
  5. 0 1
      Pods/Headers/Private/LenzCameraNativeModuleForRN/lenz_stitch_jni.hpp
  6. 0 1
      Pods/Headers/Private/LenzCameraNativeModuleForRN/lenz_stitcher.hpp
  7. 2 1
      Pods/Local Podspecs/LenzCameraNativeModuleForRN.podspec.json
  8. 1 1
      Pods/Manifest.lock
  9. 400 405
      Pods/Pods.xcodeproj/project.pbxproj
  10. 1 1
      Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig
  11. 1 1
      Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig
  12. 1 1
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN.podspec
  13. 0 190
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/LenStitcher.mm
  14. 0 64
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/VideoREADME.md
  15. 0 206
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitch_jni.cpp
  16. 0 54
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitch_jni.hpp
  17. 0 1295
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitcher.cpp
  18. 0 134
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitcher.hpp
  19. 5 3
      SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m
  20. 1 1
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Headers/LenStitcher.h
  21. 19 0
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Headers/LenzStitchSDK.h
  22. BIN
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Info.plist
  23. BIN
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/LenzStitchSDK
  24. 6 0
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Modules/module.modulemap
  25. BIN
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeDirectory
  26. BIN
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeRequirements
  27. BIN
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeRequirements-1
  28. 151 0
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeResources
  29. BIN
      SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeSignature

BIN
Demo.xcworkspace/xcuserdata/lr.xcuserdatad/UserInterfaceState.xcuserstate


+ 207 - 47
Demo.xcworkspace/xcuserdata/lr.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -30,8 +30,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2421"
-            endingLineNumber = "2421"
+            startingLineNumber = "2461"
+            endingLineNumber = "2461"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -126,8 +126,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2411"
-            endingLineNumber = "2411"
+            startingLineNumber = "2451"
+            endingLineNumber = "2451"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -142,8 +142,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1960"
-            endingLineNumber = "1960"
+            startingLineNumber = "1999"
+            endingLineNumber = "1999"
             landmarkName = "-updateNumberLabel"
             landmarkType = "7">
          </BreakpointContent>
@@ -174,8 +174,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2398"
-            endingLineNumber = "2398"
+            startingLineNumber = "2438"
+            endingLineNumber = "2438"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -190,8 +190,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1711"
-            endingLineNumber = "1711"
+            startingLineNumber = "1751"
+            endingLineNumber = "1751"
             landmarkName = "-takePhotoButtonTouchUpInside:"
             landmarkType = "7">
          </BreakpointContent>
@@ -238,8 +238,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "305"
-            endingLineNumber = "305"
+            startingLineNumber = "310"
+            endingLineNumber = "310"
             landmarkName = "-collectionView:cellForItemAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -248,14 +248,14 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "DB57B21A-AC4E-4484-9F9F-57A14DDF8EE3"
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "339"
-            endingLineNumber = "339"
+            startingLineNumber = "344"
+            endingLineNumber = "344"
             landmarkName = "-scrollViewDidEndDecelerating:"
             landmarkType = "7">
          </BreakpointContent>
@@ -270,8 +270,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "268"
-            endingLineNumber = "268"
+            startingLineNumber = "273"
+            endingLineNumber = "273"
             landmarkName = "-updateCountLabelWith:"
             landmarkType = "7">
          </BreakpointContent>
@@ -302,8 +302,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2363"
-            endingLineNumber = "2363"
+            startingLineNumber = "2403"
+            endingLineNumber = "2403"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -318,8 +318,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2462"
-            endingLineNumber = "2462"
+            startingLineNumber = "2503"
+            endingLineNumber = "2503"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -334,8 +334,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2490"
-            endingLineNumber = "2490"
+            startingLineNumber = "2531"
+            endingLineNumber = "2531"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -350,8 +350,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2384"
-            endingLineNumber = "2384"
+            startingLineNumber = "2424"
+            endingLineNumber = "2424"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -360,14 +360,14 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "D2B3733B-38B4-4308-958A-2DB7C912F72E"
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2460"
-            endingLineNumber = "2460"
+            startingLineNumber = "2501"
+            endingLineNumber = "2501"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -376,14 +376,14 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "521EA40D-378C-464D-92FF-30AADE0F3DA8"
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2404"
-            endingLineNumber = "2404"
+            startingLineNumber = "2444"
+            endingLineNumber = "2444"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -414,8 +414,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2416"
-            endingLineNumber = "2416"
+            startingLineNumber = "2456"
+            endingLineNumber = "2456"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -430,8 +430,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "255"
-            endingLineNumber = "255"
+            startingLineNumber = "256"
+            endingLineNumber = "256"
             landmarkName = "-viewDidAppear:"
             landmarkType = "7">
          </BreakpointContent>
@@ -440,14 +440,14 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "D2AB8A37-60CE-4819-A98F-9A28C1FBC359"
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "615"
-            endingLineNumber = "615"
+            startingLineNumber = "628"
+            endingLineNumber = "628"
             landmarkName = "-deleteAction"
             landmarkType = "7">
          </BreakpointContent>
@@ -462,8 +462,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/UI/PanoramaGuideView/PanoramaGuideView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "335"
-            endingLineNumber = "335"
+            startingLineNumber = "338"
+            endingLineNumber = "338"
             landmarkName = "-updateArrowWith:dir:"
             landmarkType = "7">
          </BreakpointContent>
@@ -494,8 +494,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/UI/PanoramaGuideView/PanoramaGuideView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "494"
-            endingLineNumber = "494"
+            startingLineNumber = "497"
+            endingLineNumber = "497"
             landmarkName = "-awakeFromNib"
             landmarkType = "7">
          </BreakpointContent>
@@ -526,8 +526,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2374"
-            endingLineNumber = "2374"
+            startingLineNumber = "2414"
+            endingLineNumber = "2414"
             landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -542,8 +542,8 @@
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "460"
-            endingLineNumber = "460"
+            startingLineNumber = "473"
+            endingLineNumber = "473"
             landmarkName = "-changeAction:"
             landmarkType = "7">
          </BreakpointContent>
@@ -568,7 +568,7 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "AC0291A8-11EC-4507-AA35-E2C40A672826"
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/UI/Label/TimerLabel.m"
@@ -580,5 +580,165 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "742E23AB-2951-4250-AD1E-EFFE8CB6E9D7"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1832"
+            endingLineNumber = "1832"
+            landmarkName = "-backButtonTouchUpInside:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "42C6A285-92F1-4415-B860-C3E81AF0851A"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1193"
+            endingLineNumber = "1193"
+            landmarkName = "-updateViewStatusWhenStitchSave:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "5994B843-B530-4586-B356-7C9B9F37FD8D"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1192"
+            endingLineNumber = "1192"
+            landmarkName = "-updateViewStatusWhenStitchSave:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "20970175-A7C3-4CA1-969B-D3A347002B1C"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1772"
+            endingLineNumber = "1772"
+            landmarkName = "-longPressGes:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9C26F29A-64BC-4612-B2DD-2283A359C318"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1716"
+            endingLineNumber = "1716"
+            landmarkName = "-takePhotoButtonTouchUpInside:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "F6EFEF02-A09C-4BDA-87C9-EE8CF76D63E2"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/OperationNode/OperationNodeVideoBase.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "79"
+            endingLineNumber = "79"
+            landmarkName = "-takePhotoButtonTouched"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "B506BCEE-2A13-45B7-B55D-3C8BE2E597B8"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/OperationNode/OperationNodeAIPanorama.m"
+            startingColumnNumber = "9"
+            endingColumnNumber = "9"
+            startingLineNumber = "51"
+            endingLineNumber = "51"
+            landmarkName = "-takePhotoButtonTouched"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "365448B5-E899-496B-948E-3241660A1806"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "349"
+            endingLineNumber = "349"
+            landmarkName = "-scrollViewDidEndDecelerating:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "56DCC9D6-AB89-46BD-9DD4-E3110478E1A1"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2478"
+            endingLineNumber = "2478"
+            landmarkName = "-captureOutput:didOutputSampleBuffer:fromConnection:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "EEF6B9A3-C623-4FD9-98C3-4AB23CE39E08"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1048"
+            endingLineNumber = "1048"
+            landmarkName = "-takeStillPhoto"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 1 - 1
Podfile.lock

@@ -25,7 +25,7 @@ EXTERNAL SOURCES:
     :path: "./SDK/LenzCameraNativeModuleForRN"
 
 SPEC CHECKSUMS:
-  LenzCameraNativeModuleForRN: 6f55f323a9084bb66d9fab15dab6b40f2b72da0b
+  LenzCameraNativeModuleForRN: 61a1c53fb5e46ba2543908757aee2ff70f4f6f56
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
   TensorFlowLite: 8b9dc4eb32eac0f8cb660c66bca7604da56dcc5a

+ 0 - 1
Pods/Headers/Private/LenzCameraNativeModuleForRN/LenStitcher.h

@@ -1 +0,0 @@
-../../../../SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/LenStitcher.h

+ 0 - 1
Pods/Headers/Private/LenzCameraNativeModuleForRN/lenz_stitch_jni.hpp

@@ -1 +0,0 @@
-../../../../SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitch_jni.hpp

+ 0 - 1
Pods/Headers/Private/LenzCameraNativeModuleForRN/lenz_stitcher.hpp

@@ -1 +0,0 @@
-../../../../SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitcher.hpp

+ 2 - 1
Pods/Local Podspecs/LenzCameraNativeModuleForRN.podspec.json

@@ -45,7 +45,8 @@
   ],
   "vendored_frameworks": [
     "LenzTensorFlow.framework",
-    "opencv2.framework"
+    "opencv2.framework",
+    "LenzStitchSDK.framework"
   ],
   "libraries": [
     "sqlite3",

+ 1 - 1
Pods/Manifest.lock

@@ -25,7 +25,7 @@ EXTERNAL SOURCES:
     :path: "./SDK/LenzCameraNativeModuleForRN"
 
 SPEC CHECKSUMS:
-  LenzCameraNativeModuleForRN: 6f55f323a9084bb66d9fab15dab6b40f2b72da0b
+  LenzCameraNativeModuleForRN: 61a1c53fb5e46ba2543908757aee2ff70f4f6f56
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
   TensorFlowLite: 8b9dc4eb32eac0f8cb660c66bca7604da56dcc5a

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 400 - 405
Pods/Pods.xcodeproj/project.pbxproj


+ 1 - 1
Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig

@@ -3,7 +3,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../SDK/LenzCameraNativeModul
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LenzCameraNativeModuleForRN" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SVProgressHUD" "${PODS_ROOT}/Headers/Public/YYText" '${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/Headers'
 LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LenzCameraNativeModuleForRN" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/YYText"
-OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzCameraNativeModuleForRN" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"sqlite3" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "LenzTensorFlow" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
+OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzCameraNativeModuleForRN" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"sqlite3" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "LenzStitchSDK" -framework "LenzTensorFlow" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 1 - 1
Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig

@@ -3,7 +3,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../SDK/LenzCameraNativeModul
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LenzCameraNativeModuleForRN" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SVProgressHUD" "${PODS_ROOT}/Headers/Public/YYText" '${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/Headers'
 LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LenzCameraNativeModuleForRN" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/YYText"
-OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzCameraNativeModuleForRN" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"sqlite3" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "LenzTensorFlow" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
+OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzCameraNativeModuleForRN" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"sqlite3" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "LenzStitchSDK" -framework "LenzTensorFlow" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 1 - 1
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN.podspec

@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
   # s.dependency 'AFNetworking', '~> 2.3'
   # s.static_framework = true 
   # s.prefix_header_contents = '#import "PCSSDF-prefix-header.h"'
-  s.vendored_frameworks = 'LenzTensorFlow.framework', "opencv2.framework"
+  s.vendored_frameworks = 'LenzTensorFlow.framework', "opencv2.framework", "LenzStitchSDK.framework"
   # s.vendored_frameworks = 'LenzTensorFlow.framework'
   # s.preserve_path = 'LenzCameraNativeModuleForRN/Frameworks/*'
   s.libraries = "sqlite3", "c++", "z"

+ 0 - 190
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/LenStitcher.mm

@@ -1,190 +0,0 @@
-//
-//  LenStitcher.m
-//  LenzCameraNativeModuleForRN
-//
-//  Created by lr on 2023/2/9.
-//
-
-
-#import "LenStitcher.h"
-
-
-NSString *const LenFileDirectoryVideoPath = @"/Len_VideoStitch_Temp/";
-
-dispatch_queue_t queue(void) {
-    static dispatch_queue_t queue = nil;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        queue = dispatch_queue_create("com.lenz.video.stitch", DISPATCH_QUEUE_SERIAL);
-    });
-    return queue;
-};
-
-@implementation LenStitcher
-
-
-/// videostitch with default path,
-+ (void)videoStitchWith:(CMSampleBufferRef)sampleBuffer
-               dirction:(LenVideoStitchDirction)dirction
-                 isStop:(BOOL)isStop
-               complete:(void (^)(LenVideoStitchResult result, LenVideoStitchNeedSave needSave))complete {
-    CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
-    if (!imageBuffer) {
-        if(complete) {
-            complete(LenVideoStitchResultFail, LenVideoStitchUnNeedSaveImage);
-        }
-    }
-//    dispatch_async(queue(), ^{
-        //串行队列,减少内存开销
-        
-    @autoreleasepool {
-        CVPixelBufferLockFlags unlockFlags = kNilOptions;
-        CVPixelBufferLockBaseAddress(imageBuffer, unlockFlags);
-        const int imageWidth = (int)CVPixelBufferGetWidth(imageBuffer);
-        const int imageHeight = (int)CVPixelBufferGetHeight(imageBuffer);
-        unsigned char* sourceBaseAddr = (unsigned char*)(CVPixelBufferGetBaseAddress(imageBuffer));
-        cv::Mat mat(imageHeight, imageWidth, CV_8UC4, sourceBaseAddr, CVPixelBufferGetBytesPerRow(imageBuffer));
-        
-        int* result = videoStitch(mat, dirction, [[NSNumber numberWithBool:isStop] intValue]);
-        NSLog(@"~~~~~~~~~:%d, ~~~~~~~~~:%d", result[0], result[1]);
-        LenVideoStitchResult stitchResult = (LenVideoStitchResult)result[0];
-        LenVideoStitchNeedSave stitchNeedSave = (LenVideoStitchNeedSave)result[1];
-        if (complete) {
-            complete(stitchResult, stitchNeedSave);
-        }
-        CVPixelBufferUnlockBaseAddress(imageBuffer, unlockFlags);
-    }
-
-//    });
-}
-
-
-
-+ (UIImage *)testImageWith:(CMSampleBufferRef)sampleBuffer {
-    CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
-    if (!imageBuffer) {
-        return nil;
-    }
-    const int imageWidth = (int)CVPixelBufferGetWidth(imageBuffer);
-    const int imageHeight = (int)CVPixelBufferGetHeight(imageBuffer);
-    CVPixelBufferLockFlags unlockFlags = kNilOptions;
-    CVPixelBufferLockBaseAddress(imageBuffer, unlockFlags);
-    unsigned char* sourceBaseAddr = (unsigned char*)(CVPixelBufferGetBaseAddress(imageBuffer));
-    cv::Mat mat(imageHeight * 3 / 2, imageWidth, CV_8UC4, sourceBaseAddr, 0);
-    CVPixelBufferUnlockBaseAddress(imageBuffer, unlockFlags);
-    CVPixelBufferUnlockBaseAddress(imageBuffer, 0);
-    return [self UIImageFromCVMat:mat];
-
-}
-
-/// video reset path with default path
-+ (LenVideoPathRestResult)videoResetPath {
-    NSString *path = [LenStitcher creatDirectory];
-    if (path) {
-        return [LenStitcher videoResetPathWith:path];
-    } else {
-        return LenVideoPathRestResultFail;
-    }
-}
-
-/// video current stitch local path
-+ (NSString *)getCurrentPanoramaShow {
-    const char *path = getCurrentPanoramaShow();
-    NSString *str = [NSString stringWithCString:path encoding:NSUTF8StringEncoding];
-    return str;
-}
-
-/// video current stitch local path
-+ (NSString *)getTestCurrentPanoramaShow {
-    const char *path = getTestCurrentPanoramaShow();
-    NSString *str = [NSString stringWithCString:path encoding:NSUTF8StringEncoding];
-    return str;
-}
-
-
-+ (UIImage *)getCurrentPanoramaShowImage {
-    cv::Mat mat = getCurrentPanoramsShowMat();
-    if (mat.size) {
-        return [self UIImageFromCVMat:mat];
-    }
-    return nil;
-}
-/// reset video  path with custom path
-/// @param path  image local path
-+ (LenVideoPathRestResult)videoResetPathWith:(NSString *)path {
-
-    const char *pathChar = [path UTF8String];
-    int result = resetStitch(pathChar);
-    if (result != 1) {
-        return LenVideoPathRestResultFail;
-    }
-    return LenVideoPathRestResultSuccess;
-}
-
-
-+ (NSString *)creatDirectory {
-    
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    NSString *path = [LenStitcher rootDirectory];
-    BOOL fileExisted = [fileManager fileExistsAtPath:path isDirectory:nil];
-    if (!fileExisted) {
-        NSError *error = nil;
-        [fileManager createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error];
-        if (error) {
-            NSLog(@"create root directory fail");
-        } else {
-            return path;
-        }
-    }
-    return path;
-}
-
-
-+ (NSString *)rootDirectory {
-    return [[LenStitcher documentDirectory] stringByAppendingString:LenFileDirectoryVideoPath];
-}
-
-
-+ (NSString *)documentDirectory {
-    NSArray *documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    if ([documentDirectories count] > 0) {
-        return [documentDirectories objectAtIndex:0];
-    }
-    
-    return @"";
-}
-
-
-#pragma mark - UIImageFromCVMat
-+ (UIImage *)UIImageFromCVMat:(cv::Mat)cvMat {
-  NSData *data = [NSData dataWithBytes:cvMat.data length:cvMat.elemSize()*cvMat.total()];
-  CGColorSpaceRef colorSpace;
-  if (cvMat.elemSize() == 1) {
-      colorSpace = CGColorSpaceCreateDeviceGray();
-  } else {
-      colorSpace = CGColorSpaceCreateDeviceRGB();
-  }
-  CGDataProviderRef provider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
-  // Creating CGImage from cv::Mat
-  CGImageRef imageRef = CGImageCreate(cvMat.cols,                                 //width
-                                     cvMat.rows,                                 //height
-                                     8,                                          //bits per component
-                                     8 * cvMat.elemSize(),                       //bits per pixel
-                                     cvMat.step[0],                            //bytesPerRow
-                                     colorSpace,                                 //colorspace
-                                     kCGImageAlphaNone|kCGBitmapByteOrderDefault,// bitmap info
-                                     provider,                                   //CGDataProviderRef
-                                     NULL,                                       //decode
-                                     false,                                      //should interpolate
-                                     kCGRenderingIntentDefault                   //intent
-                                     );
-  // Getting UIImage from CGImage
-  UIImage *finalImage = [UIImage imageWithCGImage:imageRef];
-  CGImageRelease(imageRef);
-  CGDataProviderRelease(provider);
-  CGColorSpaceRelease(colorSpace);
-  return finalImage;
- }
-
-
-@end

+ 0 - 64
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/VideoREADME.md

@@ -1,64 +0,0 @@
-# 集成
-
-1.引入
-LenzCameraNativeModuleForRN.podspec
-新增OpenCV引用及依赖库
-s.vendored_frameworks = "opencv2.framework"
-s.libraries = "c++", "z"
-
-2.环境配置
-工程 Enable BitCode : NO
-    Build Active Architecture Only : NO
-    
-3.头文件导入及环境配置
-
-PCSSDF-prefix-header 新增OC头文件宏
-#ifdef __OBJC__
-#endif
-
-LenzCameraNativeModuleForRN-prefix.pch
-添加OpenCV头
-#ifdef __cplusplus
-    #import <opencv2/opencv.hpp>
-#endif
-
-## 使用
-
-核心OC代码 LenStitcher
-
-1. 开始录制 videoResetPath 重置本地local文件
-```
-- (void)takePhotoButtonTouchUpInside:(id)sender{
-    self.takePhotoButton.enabled = NO;
-    dispatch_async(dispatch_get_main_queue(), ^{
-        self.takePhotoButton.enabled = YES;
-    });
-    if(![self.currentOperationNode respondsToSelector:@selector(enable)] || self.currentOperationNode.enable){
-        [LenStitcher videoResetPath];
-        [self.currentOperationNode takePhotoButtonTouched];
-    }
-}
-```
-2.持续输出视频流及拼接图片
-
-```
-
-#pragma mark - AVCaptureVideoDataOutputSampleBufferDelegate
-- (void)captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
-    @autoreleasepool {
-        if (connection == [self.videoDataOutput connectionWithMediaType:AVMediaTypeVideo]) {
-            [[Renderer shared].cameraPass makeTextureWith:sampleBuffer];
-        }
-        [LenStitcher videoStitchWith:sampleBuffer];
-        NSString *path = [LenStitcher getCurrentPanoramaShow];
-        NSLog(@"%@", path);
-    }
-}
-
-```
-
-3. 获取local path 用于显示
-
-```
-  NSString *path = [LenStitcher getCurrentPanoramaShow];
-```

+ 0 - 206
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitch_jni.cpp

@@ -1,206 +0,0 @@
-//
-//  lenz_stitch_jni.cpp
-//  LenzCameraNativeModuleForRN
-//
-//  Created by lr on 2023/2/8.
-//
-
-#include "lenz_stitch_jni.hpp"
-#include "lenz_stitcher.cpp"
-
-#include <iostream>
-#include <string>
-
-//using namespace cv;
-
-// global data
-LenzStitcher lenz_stitcher("");
-
-//extern "C"
-//{
-
-//    jintArray matToBitmapArray(JNIEnv *env, const Mat &image) {
-//        jintArray resultImage = env->NewIntArray(image.total()+2);
-//        jint *_data = new jint[image.total()+2];
-//        for (int i = 0; i < image.total(); i++) {
-//            char r = image.data[3 * i + 2];
-//            char g = image.data[3 * i + 1];
-//            char b = image.data[3 * i + 0];
-//            char a = (char) 255;
-//            _data[i] = (((jint) a << 24) & 0xFF000000) + (((jint) r << 16) & 0x00FF0000) +
-//                    (((jint) g << 8) & 0x0000FF00) + ((jint) b & 0x000000FF);
-//        }
-//        _data[image.total()+1] = image.rows;
-//        _data[image.total()] = image.cols;
-//        env->SetIntArrayRegion(resultImage, 0, image.total()+2, _data);
-//        delete[]_data;
-//
-//        return resultImage;
-//    }
-
-
-
-
-    int* matToBitmapArray(const Mat &image) {
-//        jintArray resultImage = env->NewIntArray(image.total()+2);
-        int *_data = new int[image.total()+2];
-        for (int i = 0; i < image.total(); i++) {
-            char r = image.data[3 * i + 2];
-            char g = image.data[3 * i + 1];
-            char b = image.data[3 * i + 0];
-            char a = (char) 255;
-            _data[i] = (((int) a << 24) & 0xFF000000) + (((int) r << 16) & 0x00FF0000) +
-                    (((int) g << 8) & 0x0000FF00) + ((int) b & 0x000000FF);
-        }
-        _data[image.total()+1] = image.rows;
-        _data[image.total()] = image.cols;
-//        env->SetIntArrayRegion(resultImage, 0, image.total()+2, _data);
-//        delete[]_data;
-
-        return _data;
-    }
-
-
-
-//
-    // 重置拼接状态,一般初始化后或者拼接完成一组后调用
-    int resetStitch(const char* input_path)
-    {
-//        LOGI("main thread: resetStitch, v7a-dynamic");
-//        string _local_path = env->GetStringUTFChars(input_path, JNI_FALSE);
-        string _local_path = string(input_path);
-
-        // 等待check状态结束或者stitch状态结束再进行reset
-        int total_sleep = 0;
-        while(lenz_stitcher.stitcher_status == STITCH_STATUS_STITCHING || lenz_stitcher.stitcher_status == STITCH_STATUS_CHECKING)
-        {
-            usleep(100000); // sleep 0.1s
-            total_sleep += 100000;
-            if(total_sleep > 1000000) break; // 睡眠时间大于1秒,则不等了,继续进行reset
-
-        }
-
-        if (_local_path != lenz_stitcher.local_path)
-        {
-            lenz_stitcher.remove_local_path();
-        }
-
-//        LOGI("input_path %s", _local_path.c_str());
-        if (_local_path.length() == 0) // the inputted path is empty, for some special case
-        {
-//            LOGE("resetStitch: The local path is empty!");
-            lenz_stitcher = LenzStitcher(_local_path);
-        }
-        else if (!isFloderexit(_local_path.c_str())) // if the inputted path does not exist
-        {
-//            LOGE("resetStitch: The local path doesn't exists. build it!");
-            if (mkdir(_local_path.c_str(), S_IWRITE) == 0) // mkdir success
-            {
-                lenz_stitcher = LenzStitcher(_local_path);
-            }
-            else
-            {
-//                LOGE("resetStitch: The input path doesn't exists and can not build it!");
-            }
-        }
-        else
-        {
-            lenz_stitcher = LenzStitcher(_local_path);
-        }
-//        LOGE("main thread: resetStitch finish");
-        return 1;
-    }
-//
-///**
-// * 返回结果:最后一张拼接图路径
-// */
-//     JNIEXPORT jstring JNICALL
-//     Java_com_trax_jcall_AlgorithmNativeCarrier_getCurrentPanoramaShow(JNIEnv *env,
-//                                                                     jobject obj)
-//     {
-//         LOGI("main thread: getCurrentPanoramaShow");
-//         return env->NewStringUTF(lenz_stitcher.last_stitch_image_path.c_str());
-//     }
-
-
-const char* getCurrentPanoramaShow(void) {
-//        LOGI("main thread: getCurrentPanoramaShow");
-        return lenz_stitcher.big_stitch_image_path.c_str();
-}
-
-const char* getTestCurrentPanoramaShow(void) {
-    
-//        LOGI("main thread: getCurrentPanoramaShow");
-    return test_image_path.c_str();;
-}
-
-cv::Mat getCurrentPanoramsShowMat(void) {
-    return lenz_stitcher.last_stitch_image;
-}
-//
-//    /**
-// * 返回结果:最后一张拼接图数据
-// */
-//    JNIEXPORT jintArray JNICALL
-//    Java_com_trax_jcall_AlgorithmNativeCarrier_getCurrentPanoramaShow(JNIEnv *env,
-//                                                                    jobject obj)
-//    {
-//        LOGI("main thread: getCurrentPanoramaShow");
-//        jintArray result = matToBitmapArray(env, lenz_stitcher.last_cut_stitch_image);
-//        return result;
-//    }
-    int* nativeCarrier_getCurrentPanoramaShow()
-    {
-//        LOGI("main thread: getCurrentPanoramaShow");
-        int* result = matToBitmapArray(lenz_stitcher.last_stitch_image);
-        return result;
-    }
-/**
- * 输入:
- *      jlong image: 帧数据
- *      jint direction:当前选定的拼接方向,0异形拼,1上,2下,3左,4右
- *      jint is_last_one: 是否为最后一帧, 0不是,1是
- * 输出:
- *      jintArray: [拼接状态,是否需要存图]
- *       拼接状态:
- *          -1: 拍摄完成后拼接大图失败
- *          0: 拍摄过程中产生拼接缩略图失败
- *          1: 拼接成功
- *          2: 特征点变少,放慢速度
- *          3: 特征点极少,即将失败
- *          4:当前拍摄固定了方向,请勿往反方向移动
- *       是否需要存图:
- *          0:不需要
- *          1:需要
-*/
-
- int* videoStitch(cv::Mat mat, int direction, int is_last_one) {
-     double start = static_cast<double>(getTickCount());
-     Mat tmp_frame = mat.clone();
-//     Mat tmp_frame = mat;
-
-     Mat input_frame;
-     cvtColor(tmp_frame, input_frame, COLOR_RGBA2BGR); //转BGR
-     tmp_frame.release();
-     
-
-     int tmp_res[2] = {0, 0};
-     int* stitch_result = tmp_res;
-     int static buf[2] = {0, 0};
-
-     try {
-         stitch_result = lenz_stitcher.ofcheck_stitch(input_frame, direction, is_last_one);
-         input_frame.release();
-         buf[0] = stitch_result[0];
-         buf[1] = stitch_result[1];
-     }
-     catch (const std::exception &e) {
-//         cout<<"stitch: When checkimage encounter an error"<<e.what()<<endl;
-         lenz_stitcher.stitcher_status = STITCH_STATUS_FREE;
-     }
-     double finish = static_cast<double>(getTickCount());
-//     cout<<"main thread: videoStitch finish, total spent"<<(finish-start)/getTickFrequency()<<endl;
-     return buf;
-    
-}
-

+ 0 - 54
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitch_jni.hpp

@@ -1,54 +0,0 @@
-//
-//  lenz_stitch_jni.hpp
-//  LenzCameraNativeModuleForRN
-//
-//  Created by lr on 2023/2/8.
-//
-
-#ifndef lenz_stitch_jni_hpp
-#define lenz_stitch_jni_hpp
-
-
-#if __cplusplus && __has_include(<opencv2/imgcodecs/ios.h>)
-
-#import <opencv2/core/ocl.hpp>
-#import <opencv2/opencv.hpp>
-
-using namespace cv;
-using namespace std;
-
-
-/**
- * 输入:
- *      jlong image: 帧数据
- *      jint direction:当前选定的拼接方向,0异形拼,1上,2下,3左,4右
- *      jint is_last_one: 是否为最后一帧, 0不是,1是
- * 输出:
- *      jintArray: [拼接状态,是否需要存图]
- *       拼接状态:
- *          -1: 拍摄完成后拼接大图失败
- *          0: 拍摄过程中产生拼接缩略图失败
- *          1: 拼接成功
- *          2: 特征点变少,放慢速度
- *          3: 特征点极少,即将失败
- *          4:当前拍摄固定了方向,请勿往反方向移动
- *       是否需要存图:
- *          0:不需要
- *          1:需要
-*/
-int* videoStitch(cv::Mat mat, int direction, int is_last_one);
-
-
-int resetStitch(const char * input_path);
-const char * getCurrentPanoramaShow(void);
-
-const char* getTestCurrentPanoramaShow(void);
-
-cv::Mat getCurrentPanoramsShowMat(void);
-
-#endif
-
-
-#endif
-
-

+ 0 - 1295
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitcher.cpp

@@ -1,1295 +0,0 @@
-//
-//  lenz_stitcher.cpp
-//  LenzCameraNativeModuleForRN
-//
-//  Created by lr on 2023/2/8.
-//
-
-#include "lenz_stitcher.hpp"
-
-Ptr<Feature2D> stitch_feature_finder = SiftFeatureDetector::create();
-Ptr<FastFeatureDetector> detector = FastFeatureDetector::create(30);
-
-const string ERROR_PLACE = "PANORAMA_ERROR_PLACE";
-
-// 设定一些全局变量,用于记录后台拼接大图的数据,每次reset的时候需要把这些全局变量也一起重置
-Mat big_stitch_image = Mat();
-Mat neighbour_homo = Mat();
-vector<KeyPoint> neighbour_keypoints;
-Mat neighbour_descriptors = Mat();
-int big_stitch_status = STITCH_STATUS_INIT;
-int big_frame_num = 0;
-float big_work_scale = 0;
-string big_local_path = "";
-
-inline LenzStitcher::LenzStitcher(string input_path)
-{
-    local_path = input_path;
-
-    // 初始化拼接大图时用到的数据
-    vector<KeyPoint>().swap(neighbour_keypoints);
-    big_stitch_image = Mat();
-    neighbour_homo = Mat();
-    neighbour_descriptors = Mat();
-    big_stitch_status = STITCH_STATUS_INIT;
-    big_frame_num = 0;
-    big_work_scale = 0;
-    big_local_path = local_path;
-
-    // 清理本地目录
-    if (isFloderexit(local_path.c_str()))
-        deleteFile(local_path.c_str()); // remove the files and dirs in local path
-}
-
-inline float image_resize(Mat &image, Mat &scaled_image, int target_height, int mode)
-{
-    float work_scale = 1.0f;
-    // will scale down the image size if image rows bigger than max_width
-    if (mode == 0)
-    {
-        if (image.rows > target_height)
-            work_scale = float(target_height) / float(image.rows);
-    }
-    else
-    {
-        if (image.cols > target_height)
-            work_scale = float(target_height) / float(image.cols);
-    }
-    resize(image, scaled_image, Size(), work_scale, work_scale, 5);
-    return work_scale;
-}
-
-inline void to_gray(Mat &image, Mat &gray_image)
-{
-    int channels = image.channels();
-    if (channels == 3) // BGR
-        cvtColor(image, gray_image, COLOR_BGR2GRAY);
-    else if (channels == 1) // gray
-        image.copyTo(gray_image);
-}
-
-inline void LenzStitcher::remove_local_path()
-{
-    if (isFloderexit(local_path.c_str()))
-    {
-        deleteFile(local_path.c_str()); // remove the files and dirs in local path
-        rmdir(local_path.c_str());      // remove the local path dir
-    }
-}
-
-/**
- * @brief 视频拼接算法,
- *
- * 输出:
- *      int数组: [拼接状态,是否需要存图]
- *       拼接状态:
- *          -1: 拍摄完成后拼接大图失败
- *          0: 拍摄过程中产生拼接缩略图失败
- *          2: 特征点变少,放慢速度
- *          3: 特征点极少,即将失败
- *          4:当前拍摄固定了方向,请勿往反方向移动
- *       是否需要存图:
- *          0:不需要
- *          1:需要
- *
- */
-inline int *LenzStitcher::ofcheck_stitch(Mat &input_frame, int const direction, int const is_last_one)
-{
-//    cout << "input_frame shape is " << input_frame.rows << "*" << input_frame.rows << ", type is " << input_frame.type();
-    // 使用光流法来进行图片的匹配
-    int static stitch_result[2]; // 返回结果有2个字段,第一个字段是拼接状态,第二个字段是是否需要存帧
-    stitch_result[0] = 1;        // 默认当前帧会拼接成功
-    stitch_result[1] = 0;
-
-    if (big_stitch_status == STITCH_STATUS_FAILED)
-    {
-        stitch_result[0] = -1; // 拼接大图出现失败,则直接提示失败
-        return stitch_result;
-    }
-
-    // 最后一帧不计算缩略图直接拼大图并返回大图拼接结果
-    if (is_last_one)
-    {
-        // 在子线程进行拼接
-        big_frame_index++;
-        thread t(stitch_big_image, input_frame, last_angles, direction, big_frame_index);
-        t.detach();
-
-        bool stitch_success = get_big_image(big_frame_index);
-        if (!stitch_success)
-        {
-            stitch_result[0] = -1; // 拍摄完成后拼接大图失败
-        }
-        return stitch_result;
-    }
-
-    if (stitcher_status == STITCH_STATUS_CHECKING)
-    {
-//        cout << "check: The stitcher is still running other function!" << stitcher_status << endl;
-        stitch_result[0] = 0;
-        return stitch_result;
-    }
-
-    bool save_this = false;
-    stitcher_status = STITCH_STATUS_CHECKING;
-
-    Mat frame;
-    float resize_scale = image_resize(input_frame, frame, STITCH_HEIGHT, 1);
-//    rotate(frame, frame, 0);
-    // 图片压缩
-    Mat scaled_frame, scaled_gray_frame;
-    resize_scale = image_resize(input_frame, scaled_frame, FEATURE_HEIGHT, 1);
-//    rotate(scaled_frame, scaled_frame, 0);
-    to_gray(scaled_frame, scaled_gray_frame);
-    scaled_frame.release();
-    float work_scale = 1.0 * scaled_gray_frame.rows / frame.rows;
-
-    vector<KeyPoint> frame_keypoints;
-    detector->detect(scaled_gray_frame, frame_keypoints);
-
-    if (frame_keypoints.size() < matches_thresh)
-    {
-        stitch_result[0] = 0;
-        stitcher_status = STITCH_STATUS_FREE;
-        return stitch_result;
-    }
-
-    frame_index++;
-
-    // get the perspective corners
-    vector<Point2f> frame_corners(4);
-    frame_corners[0] = Point2f(0, 0);
-    frame_corners[1] = Point2f(frame.cols, 0);
-    frame_corners[2] = Point2f(frame.cols, frame.rows);
-    frame_corners[3] = Point2f(0, frame.rows);
-    vector<Point2f> transpose_corners(4);
-    if (frame_index == 1)
-    {
-        last_stitch_image = frame;
-        // update the last stitch image
-        // string _stitched_img_path = local_path + "last_stitch.jpg";
-        // bool status = imwrite(_stitched_img_path, frame);
-        // last_stitch_image_path = _stitched_img_path;
-
-        last_warp_points = frame_corners;
-        last_check_data.scaled_gray_frame = scaled_gray_frame;
-        last_check_data.keypoints = frame_keypoints;
-        last_check_data.work_scale = work_scale;
-        last_check_data.homo = (Mat_<double>(3, 3) << 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0);
-
-        // 在子线程进行拼接
-        big_frame_index++;
-        thread t(stitch_big_image, input_frame, last_angles, direction, big_frame_index);
-        t.detach();
-
-        stitcher_status = STITCH_STATUS_FREE;
-        stitch_result[1] = 1;
-        return stitch_result;
-    }
-
-    vector<Point2f> frame_points, last_frame_points;
-    randomSelectKeyPoints(last_check_data.keypoints, last_frame_points, 250);
-
-    vector<uchar> vstatus;
-    vector<float> verror;
-    calcOpticalFlowPyrLK(last_check_data.scaled_gray_frame, scaled_gray_frame, last_frame_points, frame_points, vstatus, verror);
-    vector<Point2f> matched_frame_points, neighbour_points;
-    int good_match_count = 0;
-    for (unsigned int i = 0; i < vstatus.size(); i++)
-    {
-        if (vstatus[i] == 0)
-            continue;
-        good_match_count++;
-        neighbour_points.push_back(Point2f(last_frame_points[i].x / work_scale, last_frame_points[i].y / work_scale));
-        matched_frame_points.push_back(Point2f(frame_points[i].x / work_scale, frame_points[i].y / work_scale));
-    }
-    //    LOGI("matched_frame_points size %d", matched_frame_points.size());
-    if (matched_frame_points.size() < matches_thresh)
-    {
-        stitcher_status = STITCH_STATUS_FREE;
-        failed_count++;
-        if (failed_count >= failed_thresh)
-        {
-            stitch_result[0] = 0; // 特征点太少导致缩略图拼接失败了
-        }
-        return stitch_result;
-    }
-    Mat H = findHomography(matched_frame_points, neighbour_points, RANSAC); // find current frame perspective to neighbour image homography
-    // get the initial perspective corners, to find the shift
-    perspectiveTransform(frame_corners, transpose_corners, H);
-    int move_direction = get_direction(frame_corners, transpose_corners); // 1从上到下,2从下到上,3从左到右,4从右到左
-    if (last_direction == 0)
-    {
-        last_direction = move_direction; // 异形拼接的时候会拐弯,所以需要记录下它的上一个方向,当方向变化时,需要把那一帧给拼起来
-    }
-    if ((direction == 1 && move_direction == 2) ||
-        (direction == 2 && move_direction == 1) ||
-        (direction == 3 && move_direction == 4) ||
-        (direction == 4 && move_direction == 3))
-    {
-        //        LOGI("请保持手机稳定向固定方向移动!");
-        stitcher_status = STITCH_STATUS_FREE;
-        stitch_result[0] = 4;
-        return stitch_result;
-    }
-    H = last_check_data.homo * H;
-    perspectiveTransform(frame_corners, transpose_corners, H);
-
-    float left_x, right_x, top_y, bottom_y;
-    left_x = min_axis(vector<float>{transpose_corners[0].x, transpose_corners[1].x, transpose_corners[2].x, transpose_corners[3].x});
-    top_y = min_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y, transpose_corners[2].y, transpose_corners[3].y});
-
-    float base_shift_x = (left_x < 0) ? -left_x : 0;
-    total_shift_x += base_shift_x;
-    float base_shift_y = (top_y < 0) ? -top_y : 0;
-    total_shift_y += base_shift_y;
-    Mat shift = (Mat_<double>(3, 3) << 1.0, 0.0, base_shift_x, 0.0, 1.0, base_shift_y, 0.0, 0.0, 1.0);
-    H = shift * H;
-    perspectiveTransform(last_warp_points, last_warp_points, shift); // 把之前的需要存下来的图的框映射到拼接图上
-
-    perspectiveTransform(frame_corners, transpose_corners, H); // 把当前图片的四个顶点映射到拼接图上
-    // 如果图片映射后的4个顶点非凸,直接返回失败
-    if (!is_convex(transpose_corners))
-    {
-//        LOGE("error conners is not convex");
-        stitcher_status = STITCH_STATUS_FREE;
-        failed_count++;
-        if (failed_count >= failed_thresh)
-        {
-            stitch_result[0] = 0;
-        }
-        return stitch_result;
-    }
-
-    // 计算映射后的四边形的四个内角
-    float a0 = angle_of_two_vector(transpose_corners[1], transpose_corners[3], transpose_corners[0]);
-    float a1 = angle_of_two_vector(transpose_corners[2], transpose_corners[0], transpose_corners[1]);
-    float a2 = angle_of_two_vector(transpose_corners[3], transpose_corners[1], transpose_corners[2]);
-    float a3 = angle_of_two_vector(transpose_corners[0], transpose_corners[2], transpose_corners[3]);
-    // LOGI("calced angle a0 %f, a1 %f, a2 %f a3 %f", a0, a1, a2, a3);
-    vector<float> angles = vector<float>{a0, a1, a2, a3};
-    float min_angle = min_axis(angles);
-
-    // 获取4个映射到拼接图外接顶点
-    left_x = min_axis(vector<float>{transpose_corners[0].x, transpose_corners[3].x});
-    right_x = max_axis(vector<float>{transpose_corners[1].x, transpose_corners[2].x});
-    bottom_y = max_axis(vector<float>{transpose_corners[2].y, transpose_corners[3].y});
-    top_y = min_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y});
-
-    // 获取拼接图的尺寸
-    float stitch_width = MAX(right_x, last_stitch_image.cols + total_shift_x);
-    float stitch_height = MAX(bottom_y, last_stitch_image.rows + total_shift_y);
-    float warp_width = right_x - left_x;
-    float warp_height = bottom_y - top_y;
-
-    // 判断一些异常情况要及时返回失败
-    if (min_angle < angle_thresh || stitch_width > MAX_SIZE || stitch_height > MAX_SIZE || warp_width < 2 || warp_height < 2)
-    {
-        //        LOGE("error angle %f, stitch shape %f*%f, warp shape %f*%f", angle, stitch_width, stitch_height, warp_width, warp_height);
-        stitcher_status = STITCH_STATUS_FREE;
-        failed_count++;
-        if (failed_count >= failed_thresh)
-        {
-            stitch_result[0] = 0;
-        }
-        return stitch_result;
-    }
-    last_angles = angles;
-
-    // 计算当前图和上一个保存下来的图在拼接图上的重合度
-    float iou = single_box_iou(last_warp_points, transpose_corners);
-
-    // 如果当前图片与上一张存下来的图的iou低于阈值或者传入参数告诉我这是最后一帧
-    // 或者手机移动的方向变化了(设定一下iou的阈值排除抖动的干扰)
-    if (iou < iou_thresh || (last_direction != move_direction && iou < 0.9))
-    {
-        last_warp_points = transpose_corners;
-        stitch_result[1] = 1; // 需要保存当前帧到本地
-
-        // 在子线程进行拼接
-        big_frame_index++;
-        save_this = true;
-        thread t(stitch_big_image, input_frame, angles, direction, big_frame_index);
-        t.detach();
-    }
-
-    // 开始拼接,设定拼接频率
-    if (save_this)
-    {
-        // merge the warped frame to the last stitched image
-        Mat stitch_image(stitch_height, stitch_width, CV_8UC3, Scalar(0));
-        // copy last stitch image to this new image
-        last_stitch_image.copyTo(stitch_image(Rect(total_shift_x, total_shift_y, last_stitch_image.cols, last_stitch_image.rows)));
-        total_shift_x = 0;
-        total_shift_y = 0;
-
-        Mat warpH = H.clone();
-        Mat warp_shift = (Mat_<double>(3, 3) << 1.0, 0.0, -left_x, 0.0, 1.0, -top_y, 0.0, 0.0, 1.0);
-        warpH = warp_shift * warpH;
-        Mat scaled_image_warp;
-        warpPerspective(frame, scaled_image_warp, warpH, Size(warp_width, warp_height));
-
-        Mat last_shift_img = stitch_image.clone();
-        scaled_image_warp.copyTo(stitch_image(Rect(left_x, top_y, warp_width, warp_height)));
-        scaled_image_warp.release();
-
-        optimizeSeam(last_shift_img, stitch_image, transpose_corners);
-        last_shift_img.release();
-
-        // string _stitched_img_path = local_path + "last_stitch.jpg";
-        // bool status = imwrite(_stitched_img_path, stitch_image);
-        // last_stitch_image_path = _stitched_img_path;
-        last_stitch_image = stitch_image;
-    }
-
-    last_check_data.scaled_gray_frame = scaled_gray_frame;
-    last_check_data.keypoints = frame_keypoints;
-    last_check_data.work_scale = work_scale;
-    last_check_data.homo = H;
-    last_direction = move_direction;
-
-    stitcher_status = STITCH_STATUS_FREE;
-    int point_size = MIN(frame_keypoints.size(), matched_frame_points.size());
-    if (point_size < 20)
-    {
-        stitch_result[0] = 3; // 特征点极少,即将失败
-    }
-    else if (point_size < 100)
-    {
-        stitch_result[0] = 2; // 特征点变少,放慢速度
-    }
-    failed_count = 0; // 当前帧拼接成功的话重置拼接失败的次数
-    return stitch_result;
-}
-
-inline void stitch_big_image(Mat frame, vector<float> angles, int direction, int big_frame_index)
-{
-    double start, finish;
-    // 如果前面某张图片拼接大图的时候失败了,后续也不用继续拼了
-    if (big_stitch_status == STITCH_STATUS_FAILED)
-    {
-        //        LOGE("sub thread: stitch failed %d", big_frame_index);
-        big_frame_num++;
-        return;
-    }
-    try
-    {
-        float resize_scale = image_resize(frame, frame, BIG_STITCH_HEIGHT, 1);
-        rotate(frame, frame, 0);
-        // 只有在按照固定方向拼接的时候才进行柱面投影,否则接缝会太多不好看,
-        // 角度变化太大的话对输入图片加入柱面投影以确保拼接图不会变形太大
-        float angle1 = (angles[0] + angles[3]) / 2, angle2 = (angles[1] + angles[2]) / 2;
-        if (angle1 < 80)
-        {
-            cylindrical_projection(frame, frame, angle1);
-        }
-        else if (angle2 < 80)
-        {
-            cylindrical_projection(frame, frame, angle2);
-        }
-        Mat scaled_frame;
-        big_work_scale = image_resize(frame, scaled_frame, BIG_FEATURE_HEIGHT, 0);
-        vector<KeyPoint> keypoints;
-        Mat descriptors;
-        stitch_feature_finder->detectAndCompute(scaled_frame, Mat(), keypoints, descriptors);
-
-        // test
-        string _img_path = big_local_path + "big_frame" + to_string(big_frame_index) + ".jpg";
-        bool status = imwrite(_img_path, scaled_frame);
-        test_image_path = _img_path;
-
-        start = static_cast<double>(getTickCount());
-        while (big_stitch_status == STITCH_STATUS_STITCHING)
-        {
-            finish = static_cast<double>(getTickCount());
-            if ((finish - start) / getTickFrequency() > 10)
-            {
-                //                LOGE("sub thread: failed cause stitching long time %d", big_frame_index);
-                big_frame_num++;
-                big_stitch_status = STITCH_STATUS_FAILED;
-                return;
-            }
-            usleep(10000); // 等待10ms, 其他线程正在拼接,等待其他线程结束
-        }
-        start = static_cast<double>(getTickCount());
-        while (big_frame_index != big_frame_num + 1)
-        {
-            finish = static_cast<double>(getTickCount());
-            if ((finish - start) / getTickFrequency() > 10)
-            {
-                //                LOGE("sub thread: failed cause wait long time %d", big_frame_index);
-                big_frame_num++;
-                big_stitch_status = STITCH_STATUS_FAILED;
-                return;
-            }
-            usleep(10000); // 等待10ms, 排队,按顺序拼
-        }
-
-        if (big_stitch_status == STITCH_STATUS_INIT) // 第一张图
-        {
-            big_stitch_status = STITCH_STATUS_STITCHING;
-            big_stitch_image = frame;
-            neighbour_homo = (Mat_<double>(3, 3) << 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0);
-            neighbour_keypoints = keypoints;
-            neighbour_descriptors = descriptors;
-            big_stitch_status = STITCH_STATUS_FREE;
-            //            LOGI("sub thread: stitch finished %d", big_frame_index);
-            big_frame_num++;
-            return;
-        }
-
-        // 正式开始拼接
-        big_stitch_status = STITCH_STATUS_STITCHING;
-        //        LOGI("sub thread: start stitching %d", big_frame_index);
-        vector<DMatch> good_matches;
-        single_match(neighbour_descriptors, descriptors, good_matches, 0.2);
-        int good_match_count = good_matches.size();
-        if (good_match_count < 20)
-        {
-            //            LOGE("sub thread: stitch %d image failed, too less good match point %d", big_frame_index, good_match_count);
-            big_stitch_status = STITCH_STATUS_FAILED;
-            big_frame_num++;
-            return;
-        }
-        vector<Point2f> frame_points, neighbour_points;
-        Point2f neighbour_point, frame_point;
-        for (int i = 0; i < good_match_count; i++)
-        {
-            // Get the keypoints from the good matches
-            frame_point = keypoints[good_matches[i].trainIdx].pt;
-            frame_point.x = frame_point.x / big_work_scale; // 把点的位置映射回需要拼接的大图上
-            frame_point.y = frame_point.y / big_work_scale;
-            frame_points.push_back(frame_point);
-
-            neighbour_point = neighbour_keypoints[good_matches[i].queryIdx].pt;
-            neighbour_point.x = neighbour_point.x / big_work_scale;
-            neighbour_point.y = neighbour_point.y / big_work_scale;
-            neighbour_points.push_back(neighbour_point);
-        }
-        Mat H;
-        H = findHomography(frame_points, neighbour_points, RANSAC); // find current frame perspective to neighbour image homography
-        if (H.empty())
-        {
-            //            LOGE("sub thread: stitch %d image failed, H is empty", big_frame_index);
-            big_stitch_status = STITCH_STATUS_FAILED;
-            big_frame_num++;
-            return;
-        }
-        H = neighbour_homo * H;
-        vector<Point2f> frame_corners(4), transpose_corners(4);
-        frame_corners[0] = Point2f(0, 0);
-        frame_corners[1] = Point2f(frame.cols, 0);
-        frame_corners[2] = Point2f(frame.cols, frame.rows);
-        frame_corners[3] = Point2f(0, frame.rows);
-        perspectiveTransform(frame_corners, transpose_corners, H);
-        if (!is_convex(transpose_corners))
-        {
-            //            LOGE("sub thread: stitch %d image failed, calced corners is not convex", big_frame_index);
-            big_stitch_status = STITCH_STATUS_FAILED;
-            big_frame_num++;
-            return;
-        }
-
-        float left_x, right_x, top_y, bottom_y;
-        left_x = min_axis(vector<float>{transpose_corners[0].x, transpose_corners[1].x, transpose_corners[2].x, transpose_corners[3].x});
-        top_y = min_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y, transpose_corners[2].y, transpose_corners[3].y});
-
-        float base_shift_x = (left_x < 0) ? -left_x : 0;
-        float base_shift_y = (top_y < 0) ? -top_y : 0;
-
-        Mat shift = (Mat_<double>(3, 3) << 1.0, 0.0, base_shift_x, 0.0, 1.0, base_shift_y, 0.0, 0.0, 1.0);
-        H = shift * H;
-        perspectiveTransform(frame_corners, transpose_corners, H);
-
-        left_x = min_axis(vector<float>{transpose_corners[0].x, transpose_corners[1].x, transpose_corners[2].x, transpose_corners[3].x});
-        right_x = max_axis(vector<float>{transpose_corners[0].x, transpose_corners[1].x, transpose_corners[2].x, transpose_corners[3].x});
-        bottom_y = max_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y, transpose_corners[2].y, transpose_corners[3].y});
-        top_y = min_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y, transpose_corners[2].y, transpose_corners[3].y});
-
-        float stitch_width = MAX(right_x, big_stitch_image.cols + base_shift_x);
-        float stitch_height = MAX(bottom_y, big_stitch_image.rows + base_shift_y);
-
-        if (stitch_width > BIG_MAX_SIZE || stitch_height > BIG_MAX_SIZE)
-        {
-            //            LOGE("sub thread: stitch %d image failed, TOO BIG", big_frame_index);
-            big_stitch_status = STITCH_STATUS_FAILED;
-            big_frame_num++;
-            return;
-        }
-
-        float warp_width = right_x - left_x;
-        float warp_height = bottom_y - top_y;
-
-        Mat stitch_image(stitch_height, stitch_width, CV_8UC3, Scalar(0));
-        // 把上一张拼接图贴到对应的区域
-        big_stitch_image.copyTo(stitch_image(Rect(base_shift_x, base_shift_y, big_stitch_image.cols, big_stitch_image.rows)));
-
-        // 截取出上一张拼接图在当前图片映射的区域的矩形,获取它在这个矩形内的轮廓
-        Mat shift_stitch_image = stitch_image(Rect(left_x, top_y, warp_width, warp_height));
-        Mat tmp_gray, tmp_binary;
-        cvtColor(shift_stitch_image, tmp_gray, COLOR_BGR2GRAY);
-        threshold(tmp_gray, tmp_binary, 1, 255, THRESH_BINARY);
-        tmp_gray.release();
-        vector<vector<Point>> contours;
-        vector<Vec4i> hierarchy;
-        findContours(tmp_binary, contours, hierarchy, RETR_EXTERNAL, CHAIN_APPROX_NONE, Point());
-        tmp_binary.release();
-        // 只留下最大的那个contours
-        int _max_count = 0;
-        int _max_idx = 0;
-        for (int _i = 0; _i < contours.size(); _i++)
-        {
-            int point_num = contours[_i].size();
-            if (point_num > _max_count)
-            {
-                _max_count = point_num;
-                _max_idx = _i;
-            }
-        }
-        contours = vector<vector<Point>>{contours[_max_idx]};
-
-        // 对图片映射的区域扣掉上与一张图重合的部分后再直接相加融合,然后再处理接缝
-        Mat shift_frame_warp;
-        Mat warpH = H.clone();
-        Mat warp_shift = (Mat_<double>(3, 3) << 1.0, 0.0, -left_x, 0.0, 1.0, -top_y, 0.0, 0.0, 1.0);
-        warpH = warp_shift * warpH;
-        warpPerspective(frame, shift_frame_warp, warpH, Size(warp_width, warp_height));
-        Mat tmp_shifted_frame_warp = shift_frame_warp.clone();
-        fillPoly(shift_frame_warp, contours, Scalar(0));
-        shift_stitch_image = shift_stitch_image + shift_frame_warp;
-        fill_contours(contours, tmp_shifted_frame_warp, shift_stitch_image);
-
-        // 拼接好的图贴到对应的矩形区域
-        shift_stitch_image.copyTo(stitch_image(Rect(left_x, top_y, warp_width, warp_height)));
-
-        // 更新数据用于下次拼接
-        big_stitch_image = stitch_image;
-        neighbour_homo = H;
-        neighbour_keypoints = keypoints;
-        neighbour_descriptors = descriptors;
-        big_stitch_status = STITCH_STATUS_FREE;
-        big_frame_num++;
-    }
-    catch (const std::exception &e)
-    {
-        // 如果遇到了未捕获的异常,打印失败的信息之后直接返回失败。所有失败的情况尽可能在上面的代码里都处理掉,不要在这里处理
-        //        LOGE("sub thread: when stitching %d big image encounter an error: %s", big_frame_index, e.what());
-        big_stitch_status = STITCH_STATUS_FAILED;
-        big_frame_num++;
-    }
-}
-
-bool LenzStitcher::get_big_image(int big_frame_index)
-{
-    double start = static_cast<double>(getTickCount());
-    if (big_stitch_status == STITCH_STATUS_FAILED)
-    {
-        return false;
-    }
-    double finish;
-    while (big_frame_index > big_frame_num)
-    {
-        finish = static_cast<double>(getTickCount());
-        if ((finish - start) / getTickFrequency() > 10)
-        {
-            break; // 等待了10秒都还没有拼完,则直接返回失败, 无论什么情况下,都不该等那么久
-        }
-        usleep(10000); // 还在拼接中,继续等待拼接结束
-    }
-    if (big_frame_index == big_frame_num && big_stitch_status == STITCH_STATUS_FREE) // 全部都拼接完成了,将最后的图片保存到本地并记录路径
-    {
-        string _img_path = big_local_path + "big_stitch.jpg";
-        bool status = imwrite(_img_path, big_stitch_image);
-        big_stitch_image_path = _img_path;
-    }
-    //    LOGI("finish stitching big image...");
-    return true;
-}
-
-inline bool is_good_green_box(const vector<Point2f> &corners, const Mat &cpu_frame, float area_thresh, float angle_thresh)
-{
-    vector<Point> contour;
-    for (int p_idx = 0; p_idx < corners.size(); p_idx++)
-        contour.push_back(Point((int)corners[p_idx].x, (int)corners[p_idx].y));
-
-    if (!isContourConvex(contour))
-    {
-        //        LOGE("check: the frame is not convex!");
-        return false;
-    }
-
-    float angle = calc_hangle(corners);
-    // LOGI("check: the perspective angle is %lf", angle);
-    if (angle > angle_thresh)
-    {
-        //        LOGE("check: the perspective angle is %lf, too large!", angle);
-        return false;
-    }
-
-    float frame_area = 1.0 * cpu_frame.cols * cpu_frame.rows;
-    float green_box_area;
-    Mat mask;
-    mask = Mat::zeros(cpu_frame.size(), CV_8UC1);
-    fillPoly(mask, vector<vector<Point>>{contour}, Scalar(1));
-    green_box_area = countNonZero(mask);
-    float area_p = green_box_area / frame_area;
-    //    LOGI("check: the green box area p is %f", area_p);
-    if (area_p < area_thresh)
-    {
-        //        LOGE("check: the frame is too small!");
-        return false;
-    }
-
-    return true;
-}
-
-inline float calc_area(const vector<Point2f> &corners, const Mat &frame)
-{
-    vector<Point> contour;
-    for (int p_idx = 0; p_idx < corners.size(); p_idx++)
-        contour.push_back(Point(corners[p_idx].x, corners[p_idx].y));
-    if (!isContourConvex(contour))
-    {
-        //        LOGE("check: the frame is not convex!");
-        return 0;
-    }
-    float frame_area = 1.0 * frame.cols * frame.rows;
-    float green_box_area;
-    Mat mask;
-    mask = Mat::zeros(frame.size(), CV_8UC1);
-    fillPoly(mask, vector<vector<Point>>{contour}, Scalar(1));
-    green_box_area = countNonZero(mask);
-    float area_p = green_box_area / frame_area;
-    return area_p;
-}
-
-inline bool is_convex(const vector<Point2f> &corners)
-{
-    vector<Point2f> contour;
-    for (int p_idx = 0; p_idx < corners.size(); p_idx++)
-        contour.push_back(Point2f(corners[p_idx].x, corners[p_idx].y));
-
-    if (isContourConvex(contour))
-        return true;
-    return false;
-}
-
-inline float min_axis(vector<float> input_list)
-{
-    float min_value = input_list[0];
-    for (int i = 1; i < input_list.size(); i++)
-        if (min_value > input_list[i])
-            min_value = input_list[i];
-    return min_value;
-}
-
-inline float max_axis(vector<float> input_list)
-{
-    float max_value = input_list[0];
-    for (int i = 1; i < input_list.size(); i++)
-        if (max_value < input_list[i])
-            max_value = input_list[i];
-    return max_value;
-}
-
-// 计算四边形的四个角
-void calc_angles(vector<Point2f> &conners)
-{
-    float a0 = angle_of_two_vector(conners[1], conners[3], conners[0]);
-    float a1 = angle_of_two_vector(conners[2], conners[0], conners[1]);
-    float a2 = angle_of_two_vector(conners[3], conners[1], conners[2]);
-    float a3 = angle_of_two_vector(conners[0], conners[2], conners[3]);
-//    LOGI("calced angle a0 %f, a1 %f, a2 %f a3 %f", a0, a1, a2, a3);
-}
-
-// 以pt1为M点 pt2为N点 c为O点
-float angle_of_two_vector(Point2f &pt1, Point2f &pt2, Point2f &c)
-{
-    float theta = atan2(pt1.x - c.x, pt1.y - c.y) - atan2(pt2.x - c.x, pt2.y - c.y);
-    if (theta > M_PI)
-    {
-        theta -= 2 * M_PI;
-    }
-
-    if (theta < -M_PI)
-    {
-        theta += 2 * M_PI;
-    }
-
-    theta = theta * 180.0 / M_PI;
-    return theta;
-}
-
-inline float calc_hangle(const vector<cv::Point2f> &conners)
-{
-    float angle = 0.0f;
-    float angle1 = abs(atan((conners[0].y - conners[1].y) / (conners[0].x - conners[1].x))) * 180.0 / M_PI;
-    float angle2 = abs(atan((conners[2].y - conners[3].y) / (conners[2].x - conners[3].x))) * 180.0 / M_PI;
-    angle = (angle2 > angle1) ? angle2 : angle1;
-    return angle;
-}
-
-inline float calc_vangle(const vector<cv::Point2f> &conners)
-{
-    float angle = 0.0f;
-    float angle1 = abs(atan((conners[0].y - conners[3].y) / (conners[0].x - conners[3].x))) * 180.0 / M_PI;
-    float angle2 = abs(atan((conners[1].y - conners[2].y) / (conners[1].x - conners[2].x))) * 180.0 / M_PI;
-    //    LOGI("ofchcek: vertical angle1 %f, angle2 %f", angle1, angle2);
-    angle = (angle2 > angle1) ? angle2 : angle1;
-    return 90 - angle;
-}
-
-float calc_angle(const vector<cv::Point2f> &conners)
-{
-    float angle = 0.0f;
-    float angle1 = abs(atan((conners[0].y - conners[1].y) / (conners[0].x - conners[1].x))) * 180.0 / M_PI;
-    float angle2 = abs(atan((conners[2].y - conners[3].y) / (conners[2].x - conners[3].x))) * 180.0 / M_PI;
-    // LOGI("ofchcek: horizontal angle1 %f, angle2 %f", angle1, angle2);
-    angle = (angle2 > angle1) ? angle2 : angle1;
-
-    angle1 = abs(atan((conners[0].y - conners[3].y) / (conners[0].x - conners[3].x))) * 180.0 / M_PI;
-    angle2 = abs(atan((conners[1].y - conners[2].y) / (conners[1].x - conners[2].x))) * 180.0 / M_PI;
-    // LOGI("ofchcek: vertical angle1 %f, angle2 %f", angle1, angle2);
-    return angle;
-}
-
-inline void double_match(const Mat &query_des, const Mat &train_des, vector<DMatch> &good_matches, float check_match_conf)
-{
-    // BFMatcher matcher(NORM_L2);
-    FlannBasedMatcher matcher;
-    set<pair<int, int>> match_indices;
-    vector<vector<DMatch>> matches;
-    matcher.knnMatch(query_des, train_des, matches, 2);
-    for (size_t i = 0; i < matches.size(); ++i)
-    {
-        if (matches[i].size() < 2)
-            continue;
-        const DMatch &m0 = matches[i][0];
-        const DMatch &m1 = matches[i][1];
-        if (m0.distance < (1 - check_match_conf) * m1.distance)
-        {
-            good_matches.push_back(m0);
-            match_indices.insert(make_pair(m0.queryIdx, m0.trainIdx));
-        }
-    }
-    matches.clear();
-    matcher.knnMatch(train_des, query_des, matches, 2);
-    for (size_t i = 0; i < matches.size(); ++i)
-    {
-        if (matches[i].size() < 2)
-            continue;
-        const DMatch &m0 = matches[i][0];
-        const DMatch &m1 = matches[i][1];
-        if (m0.distance < (1 - check_match_conf) * m1.distance)
-            if (match_indices.find(make_pair(m0.trainIdx, m0.queryIdx)) == match_indices.end())
-                good_matches.push_back(DMatch(m0.trainIdx, m0.queryIdx, m0.distance));
-    }
-}
-
-inline void single_match(const Mat &query_des, const Mat &train_des, vector<DMatch> &good_matches, float check_match_conf)
-{
-    // BFMatcher matcher(NORM_L2);
-    FlannBasedMatcher matcher;
-    vector<vector<DMatch>> matches;
-    matcher.knnMatch(query_des, train_des, matches, 2);
-    for (size_t i = 0; i < matches.size(); ++i)
-    {
-        if (matches[i].size() < 2)
-            continue;
-        const DMatch &m0 = matches[i][0];
-        const DMatch &m1 = matches[i][1];
-        if (m0.distance < (1 - check_match_conf) * m1.distance)
-            good_matches.push_back(m0);
-    }
-}
-
-inline void getFilePath(const char *path, const char *filename, char *filepath)
-{
-    strcpy(filepath, path);
-    if (filepath[strlen(path) - 1] != '/')
-        strcat(filepath, "/");
-    strcat(filepath, filename);
-}
-
-inline void deleteFile(const char *path)
-{
-    DIR *dir;
-    struct dirent *dirinfo;
-    struct stat statbuf;
-    char filepath[256] = {0};
-    lstat(path, &statbuf);
-
-    if (S_ISREG(statbuf.st_mode)) // 判断是否是常规文件
-    {
-        remove(path);
-    }
-    else if (S_ISDIR(statbuf.st_mode)) // 判断是否是目录
-    {
-        if ((dir = opendir(path)) == NULL)
-            return;
-        while ((dirinfo = readdir(dir)) != NULL)
-        {
-            getFilePath(path, dirinfo->d_name, filepath);
-            if (strcmp(dirinfo->d_name, ".") == 0 || strcmp(dirinfo->d_name, "..") == 0) // 判断是否是特殊目录
-                continue;
-            deleteFile(filepath);
-            rmdir(filepath);
-            // LOGI("delete: remove local file %s successfully", filepath);
-        }
-        closedir(dir);
-    }
-    return;
-}
-
-inline bool isFloderexit(const char *path)
-{
-    DIR *dp;
-    if ((dp = opendir(path)) == NULL)
-    {
-        return false;
-    }
-
-    closedir(dp);
-    return true;
-}
-
-// 为了避免光流算法耗时太长,限定特征点的最大的个数
-void randomSelectKeyPoints(vector<KeyPoint> kpts, vector<Point2f> &pts, int max_num)
-{
-    random_device rd;
-    mt19937 rng(rd());
-    shuffle(kpts.begin(), kpts.end(), rng);
-    for (int i = 0; i < kpts.size(); i++)
-    {
-        if (i >= max_num)
-            continue;
-        pts.push_back(kpts[i].pt);
-    }
-    return;
-}
-
-// 优化两图的接缝处,使得拼接自然
-inline void optimizeSeam(Mat &last_img, Mat &stitched_image, vector<Point2f> &transpose_corners)
-{
-    int thresh = 10;
-    // 获取4个映射到大拼接图后的顶点
-    int left_x = (int)min_axis(vector<float>{transpose_corners[0].x, transpose_corners[1].x, transpose_corners[2].x, transpose_corners[3].x});
-    int right_x = (int)max_axis(vector<float>{transpose_corners[0].x, transpose_corners[1].x, transpose_corners[2].x, transpose_corners[3].x});
-    int bottom_y = (int)max_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y, transpose_corners[2].y, transpose_corners[3].y});
-    int top_y = (int)min_axis(vector<float>{transpose_corners[0].y, transpose_corners[1].y, transpose_corners[2].y, transpose_corners[3].y});
-
-    LinePara lp0, lp1, lp2, lp3;
-    float k20, k21, k22, k23;
-    getLinePara(transpose_corners[0].x, transpose_corners[0].y, transpose_corners[1].x, transpose_corners[1].y, lp0);
-    k20 = sqrt(lp0.k * lp0.k + 1);
-    getLinePara(transpose_corners[1].x, transpose_corners[1].y, transpose_corners[2].x, transpose_corners[2].y, lp1);
-    k21 = sqrt(lp1.k * lp1.k + 1);
-    getLinePara(transpose_corners[2].x, transpose_corners[2].y, transpose_corners[3].x, transpose_corners[3].y, lp2);
-    k22 = sqrt(lp2.k * lp2.k + 1);
-    getLinePara(transpose_corners[3].x, transpose_corners[3].y, transpose_corners[0].x, transpose_corners[0].y, lp3);
-    k23 = sqrt(lp3.k * lp3.k + 1);
-
-    double processWidth = right_x - left_x;  // 重叠区域的宽度
-    double processHeight = bottom_y - top_y; // 重叠区域的宽度
-    double alpha = 1;                        // last_img中像素的权重
-    for (int i = top_y; i < bottom_y; i++)
-    {
-        for (int j = left_x; j < right_x; j++)
-        {
-            if (last_img.at<Vec3b>(i, j)[0] == 0 && last_img.at<Vec3b>(i, j)[1] == 0 && last_img.at<Vec3b>(i, j)[2] == 0)
-            {
-                continue;
-            }
-            // 如果拼接图的该区域内遇到黑点,则完全拷贝上一张拼接图上的点
-            else if (stitched_image.at<Vec3b>(i, j)[0] == 0 && stitched_image.at<Vec3b>(i, j)[1] == 0 && stitched_image.at<Vec3b>(i, j)[2] == 0)
-            {
-                stitched_image.at<Vec3b>(i, j) = last_img.at<Vec3b>(i, j);
-            }
-            else if (point_2_line(lp0.k, lp0.b, k20, j, i) < thresh) // 如果点在线的附近
-            {
-                stitched_image.at<Vec3b>(i, j) = last_img.at<Vec3b>(i, j);
-            }
-            else if (point_2_line(lp1.k, lp1.b, k21, j, i) < thresh) // 如果点在线的附近
-            {
-                stitched_image.at<Vec3b>(i, j) = last_img.at<Vec3b>(i, j);
-            }
-            else if (point_2_line(lp2.k, lp2.b, k22, j, i) < thresh) // 如果点在线的附近
-            {
-                stitched_image.at<Vec3b>(i, j) = last_img.at<Vec3b>(i, j);
-            }
-            else if (point_2_line(lp3.k, lp3.b, k23, j, i) < thresh) // 如果点在线的附近
-            {
-                stitched_image.at<Vec3b>(i, j) = last_img.at<Vec3b>(i, j);
-            }
-        }
-    }
-}
-
-// 把边缘处的点给补全,免得有太多的接缝黑边
-void fill_contours(vector<vector<Point>> target_contours, Mat &source_image, Mat &target_image)
-{
-    int h = source_image.rows, w = source_image.cols;
-    // 对source_image求轮廓,并生成mask
-    Mat source_gray, target_gray;
-    cvtColor(source_image, source_gray, COLOR_BGR2GRAY);
-    cvtColor(target_image, target_gray, COLOR_BGR2GRAY);
-    Mat tmp_binary;
-    threshold(source_gray, tmp_binary, 1, 255, THRESH_BINARY);
-    vector<vector<Point>> source_contours;
-    vector<Vec4i> hierarchy;
-    findContours(tmp_binary, source_contours, hierarchy, RETR_EXTERNAL, CHAIN_APPROX_NONE, Point());
-    tmp_binary.release();
-    // 只留下最大的那个contours
-    int _max_count = 0;
-    int _max_idx = 0;
-    for (int _i = 0; _i < source_contours.size(); _i++)
-    {
-        int point_num = source_contours[_i].size();
-        if (point_num > _max_count)
-        {
-            _max_count = point_num;
-            _max_idx = _i;
-        }
-    }
-    source_contours = vector<vector<Point>>{source_contours[_max_idx]};
-    Mat mask = Mat(h, w, CV_8UC1, Scalar(0));
-    fillPoly(mask, source_contours, Scalar(1));
-
-    vector<Point> contour = target_contours[0];
-    int range = 30;
-    float weight;
-    int total_num = contour.size();
-    int line_direction = 0; // 判断当前点所在的直线的方向,0水平或者1垂直
-    int direction = 0;      // 当前点和下一个点连成的线的方向,1从左向右,2从右向左,3从上到下,4从下到上
-
-    for (int j = 0; j < total_num; j++)
-    {
-        int x = contour[j].x;
-        int y = contour[j].y;
-
-        if (x == 0 || y == 0 || x == w - 1 || y == h - 1 || mask.at<uchar>(y, x) == 0)
-            continue;
-        target_image.at<Vec3b>(y, x) = source_image.at<Vec3b>(y, x); // 填充边缘
-        int d1 = 0, d2 = 0, d3 = 0, d4 = 0;                          // 当前点在4个方向上的差异值的总和
-        // 先判断是水平还是垂直方向
-        int dx = 0, dy = 0;
-        for (int i = 0; i < 3; i++)
-        {
-            if (j - i >= 0)
-            {
-                dx += abs(x - contour[j - i].x);
-                dy += abs(y - contour[j - i].y);
-            }
-            if (j + i < total_num)
-            {
-                dx += abs(x - contour[j + i].x);
-                dy += abs(y - contour[j + i].y);
-            }
-        }
-        if (dx < dy)
-            line_direction = 0; // 水平
-        if (dx > dy)
-            line_direction = 1; // 垂直
-        for (int i = 1; i < 3; i++)
-        { // 各个方向找三个点,看差值是多少,来判断需要融合的方向
-            if (line_direction == 0)
-            {
-                // 从左向右
-                if (x + i < h)
-                    d1 += abs(target_gray.at<uchar>(y, x + i) - source_gray.at<uchar>(y, x + i));
-
-                // 从右向左
-                if (x - i >= 0)
-                    d2 += abs(target_gray.at<uchar>(y, x - i) - source_gray.at<uchar>(y, x - i));
-            }
-            else
-            {
-                // 从上到下
-                if (y + i < h)
-                    d3 += abs(target_gray.at<uchar>(y + i, x) - source_gray.at<uchar>(y + i, x));
-
-                // 从下到上
-                if (y - i >= 0)
-                    d4 += abs(target_gray.at<uchar>(y - i, x) - source_gray.at<uchar>(y - i, x));
-            }
-        }
-
-        if (d1 > d2 && d1 > d3 && d1 > d4)
-            direction = 1;
-        else if (d2 > d1 && d2 > d3 && d2 > d4)
-            direction = 2;
-        else if (d3 > d1 && d3 > d2 && d3 > d4)
-            direction = 3;
-        else if (d4 > d1 && d4 > d2 && d4 > d3)
-            direction = 4;
-
-        for (int i = 1; i < range; i++)
-        {
-            weight = 1.0 * i / range;
-            if (direction == 1)
-            { // 从左到右
-                if (x + i < w && source_gray.at<uchar>(y, x + i) > 1)
-                {
-                    target_image.at<Vec3b>(y, x + i)[0] = source_image.at<Vec3b>(y, x + i)[0] * (1 - weight) + target_image.at<Vec3b>(y, x + i)[0] * weight;
-                    target_image.at<Vec3b>(y, x + i)[1] = source_image.at<Vec3b>(y, x + i)[1] * (1 - weight) + target_image.at<Vec3b>(y, x + i)[1] * weight;
-                    target_image.at<Vec3b>(y, x + i)[2] = source_image.at<Vec3b>(y, x + i)[2] * (1 - weight) + target_image.at<Vec3b>(y, x + i)[2] * weight;
-                }
-            }
-            else if (direction == 2)
-            { // 从右到左
-                if (x - i >= 0 && source_gray.at<uchar>(y, x - i) > 1)
-                {
-                    target_image.at<Vec3b>(y, x - i)[0] = source_image.at<Vec3b>(y, x - i)[0] * (1 - weight) + target_image.at<Vec3b>(y, x - i)[0] * weight;
-                    target_image.at<Vec3b>(y, x - i)[1] = source_image.at<Vec3b>(y, x - i)[1] * (1 - weight) + target_image.at<Vec3b>(y, x - i)[1] * weight;
-                    target_image.at<Vec3b>(y, x - i)[2] = source_image.at<Vec3b>(y, x - i)[2] * (1 - weight) + target_image.at<Vec3b>(y, x - i)[2] * weight;
-                }
-            }
-            else if (direction == 3)
-            { // 从上到下
-                if (y + i < h && source_gray.at<uchar>(y + i, x) > 1)
-                {
-                    target_image.at<Vec3b>(y + i, x)[0] = source_image.at<Vec3b>(y + i, x)[0] * (1 - weight) + target_image.at<Vec3b>(y + i, x)[0] * weight;
-                    target_image.at<Vec3b>(y + i, x)[1] = source_image.at<Vec3b>(y + i, x)[1] * (1 - weight) + target_image.at<Vec3b>(y + i, x)[1] * weight;
-                    target_image.at<Vec3b>(y + i, x)[2] = source_image.at<Vec3b>(y + i, x)[2] * (1 - weight) + target_image.at<Vec3b>(y + i, x)[2] * weight;
-                }
-            }
-            else if (direction == 4)
-            { // 从下到上
-                if (y - i >= 0 && source_gray.at<uchar>(y - i, x) > 1)
-                {
-                    target_image.at<Vec3b>(y - i, x)[0] = source_image.at<Vec3b>(y - i, x)[0] * (1 - weight) + target_image.at<Vec3b>(y - i, x)[0] * weight;
-                    target_image.at<Vec3b>(y - i, x)[1] = source_image.at<Vec3b>(y - i, x)[1] * (1 - weight) + target_image.at<Vec3b>(y - i, x)[1] * weight;
-                    target_image.at<Vec3b>(y - i, x)[2] = source_image.at<Vec3b>(y - i, x)[2] * (1 - weight) + target_image.at<Vec3b>(y - i, x)[2] * weight;
-                }
-            }
-        }
-    }
-}
-
-inline float point_2_line(float k, float b, float k2, float x, float y)
-{
-    float distance = abs(k * x + b - y) / k2;
-    return distance;
-}
-
-// 获取直线参数
-inline void getLinePara(float x1, float y1, float x2, float y2, LinePara &LP)
-{
-    double m = 0;
-
-    // 计算分子
-    m = x2 - x1;
-
-    if (0 == m)
-    {
-        LP.k = 10000.0;
-        LP.b = y1 - LP.k * x1;
-    }
-    else
-    {
-        LP.k = (y2 - y1) / (x2 - x1);
-        LP.b = y1 - LP.k * x1;
-    }
-}
-
-// 1从上到下,2从下到上,3从左到右,4从右到左
-int get_direction(vector<Point2f> &frame_corners, vector<Point2f> &transpose_corners)
-{
-    float dx = ((transpose_corners[0].x - frame_corners[0].x) +
-                (transpose_corners[1].x - frame_corners[1].x) +
-                (transpose_corners[2].x - frame_corners[2].x) +
-                (transpose_corners[3].x - frame_corners[3].x)) /
-               4;
-    float dy = ((transpose_corners[0].y - frame_corners[0].y) +
-                (transpose_corners[1].y - frame_corners[1].y) +
-                (transpose_corners[2].y - frame_corners[2].y) +
-                (transpose_corners[3].y - frame_corners[3].y)) /
-               4;
-    int direction;
-    if (abs(dx) > abs(dy))
-    {
-        if (dx > 0)
-            direction = 3;
-        else
-            direction = 4;
-    }
-    else
-    {
-        if (dy > 0)
-            direction = 1;
-        else
-            direction = 2;
-    }
-    return direction;
-}
-
-inline int dcmp(float x)
-{ // 精度误差比较
-    if (x > 1e-14)
-        return 1;
-    return x < -1e-14 ? -1 : 0;
-}
-
-float cross(Point2f a, Point2f b, Point2f c) { return (a.x - c.x) * (b.y - c.y) - (b.x - c.x) * (a.y - c.y); } // 叉积
-
-inline float CPIA(Point2f a[], Point2f b[], int na, int nb)
-{                                   // 传入两个三角形,求相交部分的凸包
-    vector<Point2f> p(20), tmp(20); // 复制点集与临时点集(P其实可以用B来做
-    int tn, sflag, eflag;           // 每轮相交凸包的点,叉乘符号
-    a[na] = a[0], b[nb] = b[0];     // 末点用初点复制方便首末点连边
-    for (int k = 0; k <= nb; k++)
-    {
-        p[k] = b[k];
-    }
-    for (int i = 0; i < na && nb > 2; i++)
-    {                                              // 扫一次A
-        sflag = dcmp(cross(a[i + 1], p[0], a[i])); // 取A两点与B第一点求叉乘符号
-        for (int j = tn = 0; j < nb; j++, sflag = eflag)
-        { // 扫一次B,更新TMP,TN是点数
-            if (sflag >= 0)
-                tmp[tn++] = p[j];                          // 叉乘为正就是B数组的那个点压入
-            eflag = dcmp(cross(a[i + 1], p[j + 1], a[i])); // 求叉乘符号
-            if ((sflag ^ eflag) == -2)
-                tmp[tn++] = get_intersection_point(a[i], a[i + 1], p[j], p[j + 1]); // 求交点
-        }
-        for (int k = 0; k < tn; k++)
-        {
-            p[k] = tmp[k];
-        }
-        nb = tn, p[nb] = p[0]; // TN即TMP点数记到NB
-    }                          // 其实该是NP表示P数组个数,这里省了个变量就用NB表示,下面第二行做参数而已
-    if (nb < 3)
-        return 0.f;            // 相交部分凸包不够三个点,面积就是0
-    return PolygonArea(p, nb); // 求出相交凸包部分的面积
-}
-
-inline float SPIA(vector<Point2f> a, vector<Point2f> b, int na, int nb)
-{                                               // 传入两个多边形的点
-    int i, j;                                   // 循环变量
-    Point2f t1[4], t2[4];                       // 其实T13与T23没用上
-    double num1, num2;                          // 叉乘符号
-    float res = 0.f;                            // 答案初始化
-    a[na] = t1[0] = a[0], b[nb] = t2[0] = b[0]; // 初始化T1,T2和ANA,BNB
-    for (i = 2; i < na; i++)
-    {                                            // 扫一次第一个多边形全部点
-        t1[1] = a[i - 1], t1[2] = a[i];          // 每次在第一个多边形取两个点赋给T11,T12
-        num1 = dcmp(cross(t1[1], t1[2], t1[0])); // 求出叉乘符号
-        if (num1 < 0)
-        {
-            t1[1] = a[i], t1[2] = a[i - 1];
-        }
-        for (j = 2; j < nb; j++)
-        {                                            // 扫一次第二个多边形全部点
-            t2[1] = b[j - 1], t2[2] = b[j];          // 然后再在第二个多边形取两个点赋给T21,T22
-            num2 = dcmp(cross(t2[1], t2[2], t2[0])); // 求出叉乘符号
-            if (num2 < 0)
-            {
-                t2[1] = b[j], t2[2] = b[j - 1];
-            }
-            res += CPIA(t1, t2, 3, 3); // 累加相交部分面积
-        }
-    }
-    return res;
-}
-
-Point2f get_intersection_point(Point2f a, Point2f b, Point2f c, Point2f d)
-{ // 传入四点即两直线,输出交点
-    Point2f p = a;
-    float t = ((a.x - c.x) * (c.y - d.y) - (a.y - c.y) * (c.x - d.x)) / ((a.x - b.x) * (c.y - d.y) - (a.y - b.y) * (c.x - d.x));
-    p.x += (b.x - a.x) * t;
-    p.y += (b.y - a.y) * t;
-    return p; // 输出交点,证明用数学方法易证
-}
-
-inline float PolygonArea(vector<Point2f> p, int n)
-{ // 计算多边形面积,三角剖分
-    if (n < 3)
-        return 0.0;
-    if (n >= 24)
-        return 0.0;
-    float s = p[0].y * (p[n - 1].x - p[1].x);
-    p[n] = p[0];
-    for (int i = 1; i < n; ++i)
-        s += p[i].y * (p[i - 1].x - p[i + 1].x);
-    return fabs(s * 0.5); // 叉乘出来是平行四边形面积故/2,且顺逆方向不定,故取ABS变正
-}
-
-inline float single_quadrangle_iou(vector<Point2f> pts1, vector<Point2f> pts2)
-{
-    const float area1 = PolygonArea(pts1, 4);
-    const float area2 = PolygonArea(pts2, 4);
-
-    if (area1 < 1e-14 || area2 < 1e-14)
-    {
-        return 0.f;
-    }
-
-    const float intersection = SPIA(pts1, pts2, 4, 4);
-
-    const float iou = intersection / (area1 + area2 - intersection);
-    return iou;
-}
-
-inline float single_box_iou(vector<Point2f> pts1, vector<Point2f> pts2)
-{
-    int xmin1 = (int)min_axis(vector<float>{pts1[0].x, pts1[1].x, pts1[2].x, pts1[3].x});
-    int xmax1 = (int)max_axis(vector<float>{pts1[0].x, pts1[1].x, pts1[2].x, pts1[3].x});
-    int ymax1 = (int)max_axis(vector<float>{pts1[0].y, pts1[1].y, pts1[2].y, pts1[3].y});
-    int ymin1 = (int)min_axis(vector<float>{pts1[0].y, pts1[1].y, pts1[2].y, pts1[3].y});
-    float area1 = (float)(xmax1 - xmin1) * (ymax1 - ymin1);
-
-    int xmin2 = (int)min_axis(vector<float>{pts2[0].x, pts2[1].x, pts2[2].x, pts2[3].x});
-    int xmax2 = (int)max_axis(vector<float>{pts2[0].x, pts2[1].x, pts2[2].x, pts2[3].x});
-    int ymax2 = (int)max_axis(vector<float>{pts2[0].y, pts2[1].y, pts2[2].y, pts2[3].y});
-    int ymin2 = (int)min_axis(vector<float>{pts2[0].y, pts2[1].y, pts2[2].y, pts2[3].y});
-    float area2 = (float)(xmax2 - xmin2) * (ymax2 - ymin2);
-
-    int inter_xmin = MAX(xmin1, xmin2);
-    int inter_xmax = MIN(xmax1, xmax2);
-    int inter_ymin = MAX(ymin1, ymin2);
-    int inter_ymax = MIN(ymax1, ymax2);
-
-    float inter_area = (float)(inter_xmax - inter_xmin) * (inter_ymax - inter_ymin);
-    float union_area = (area1 + area2 - inter_area);
-    if (union_area < 1e-14)
-    {
-        return 0.f;
-    }
-
-    float iou = 1.0 * inter_area / union_area;
-
-    return iou;
-}
-
-// 柱面投影
-void cylindrical_projection(Mat &img, Mat &output, float angle)
-{
-    float w = img.cols;
-    float h = img.rows;
-    Mat map_img = Mat(h, w, CV_8UC3, Scalar(0));
-    float f = (w / (90 - angle) * 5) / atan(M_PI / 15);
-    float cx = w / 2.0f;
-    float cy = h / 2.0f;
-    int max_col = 0;
-    for (int i = 0; i < img.rows; i++)
-    {
-        for (int j = 0; j < img.cols; j++)
-        {
-            float x = j;
-            float y = i;
-            float x1 = f * atan((x - cx) / f) + f * atan(cx / f);
-            float y1 = f * (y - cy) / sqrt((x - cx) * (x - cx) + f * f) + cy;
-
-            int col = (int)(x1 + 0.5f); // 加0.5是为了四舍五入
-            int row = (int)(y1 + 0.5f); // 加0.5是为了四舍五入
-            max_col = col > max_col ? col : max_col;
-            if (col < img.cols && row < img.rows)
-            {
-                map_img.at<Vec3b>(row, col)[0] = img.at<Vec3b>(i, j)[0];
-                map_img.at<Vec3b>(row, col)[1] = img.at<Vec3b>(i, j)[1];
-                map_img.at<Vec3b>(row, col)[2] = img.at<Vec3b>(i, j)[2];
-            }
-        }
-    }
-    output = map_img(Rect(0, 0, max_col, h));
-}

+ 0 - 134
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/lenz_stitcher.hpp

@@ -1,134 +0,0 @@
-//
-//  lenz_stitcher.hpp
-//  LenzCameraNativeModuleForRN
-//
-//  Created by lr on 2023/2/8.
-//
-
-#ifndef lenz_stitcher_hpp
-#define lenz_stitcher_hpp
-
-#if __cplusplus && __has_include(<opencv2/imgcodecs/ios.h>)
-
-#import <opencv2/core/ocl.hpp>
-#import <opencv2/opencv.hpp>
-
-#include <iostream>
-#include <thread>
-#include <vector>
-#include <string>
-#include <random>
-#include <math.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-using namespace cv;
-using namespace cv::detail;
-using namespace cv::ocl;
-using namespace std;
-
-#define STITCH_STATUS_INIT 0
-#define STITCH_STATUS_CHECKING 1
-#define STITCH_STATUS_STITCHING 2
-#define STITCH_STATUS_FREE 3
-#define STITCH_STATUS_FAILED 4
-
-#define FEATURE_HEIGHT 300
-#define STITCH_HEIGHT 300
-#define BIG_STITCH_HEIGHT 1000
-#define BIG_FEATURE_HEIGHT 800
-
-#define MAX_SIZE 2000      // 缩略图的最大尺寸,长或宽都不能超过MAX_SIZE*MAX_SIZE,否则直接报错
-#define BIG_MAX_SIZE 10000 // 拼接大图的最大尺寸, 长或宽都不能超过BIG_MAX_SIZE
-
-struct stitch_data
-{
-    Mat scaled_gray_frame;
-    float work_scale;
-    vector<KeyPoint> keypoints;
-    Mat descriptors;
-    Mat homo = (Mat_<double>(3, 3) << 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); // store homography matrix to base image
-};
-
-struct LinePara
-{
-    float k;
-    float b;
-};
-
-string test_image_path = "";
-
-class LenzStitcher
-{
-public:
-    string task_id = "";
-    string local_path = "";
-    int stitcher_status = STITCH_STATUS_INIT; // 0: initialized, 1: checking, 2: stitching, 3: free
-
-    int failed_count = 0;  // 当前连续失败的帧数
-    int failed_thresh = 5; // 连续5帧失败才返回失败
-
-    float iou_thresh = 0.5;  // iou低于该阈值的时候把这张图片存下来
-    float area_thresh = 0.1; // area threshold for green box
-    float angle_thresh = 45; // angle threshold for green box vertical edge
-    int matches_thresh = 10; // 前后两帧基于光流的匹配点的个数的阈值,低于该值则无法进行拼接
-    float check_match_conf = 0.2f;
-    int frame_index = 0;
-    vector<Point2f> last_warp_points; // 上一张存下来的图的四个点在拼接图上的坐标
-    int big_frame_index = 0;          // 存下来的帧的信息
-    float total_shift_x = 0;
-    float total_shift_y = 0;
-
-    Mat last_stitch_image = Mat(); // 最后一张拼接缩略图
-    int last_direction = 0;        // 上一帧的手机移动方向
-    vector<float> last_angles = vector<float>{90, 90, 90, 90};
-    string last_stitch_image_path = ""; // 拼接缩略图的本地路径
-    stitch_data last_check_data;        // 上一帧的数据
-    string big_stitch_image_path = "";  // 拼接大图的本地路径
-
-    string test_image_path = ""; // test
-
-    LenzStitcher(string input_id);
-    int *ofcheck_stitch(Mat &frame, int const direction, int const is_last_one); // 输入每一帧实时产生拼接缩略图
-
-    bool get_big_image(int get_big_image); // 在收到当前帧是最后一帧的时候运行,会用之前存下来的帧数据产生最后的拼接大图
-    void remove_local_path();
-};
-
-bool is_good_green_box(const vector<Point2f> &corners, const Mat &cpu_frame, float area_thresh, float angle_thresh);
-bool is_convex(const vector<Point2f> &corners);
-float calc_area(const vector<Point2f> &corners, const Mat &frame);
-float min_axis(vector<float> input_list);
-float max_axis(vector<float> input_list);
-float calc_angle(const vector<cv::Point2f> &conners);
-float calc_vangle(const vector<cv::Point2f> &conners);
-float calc_hangle(const vector<cv::Point2f> &conners);
-void double_match(const Mat &query_des, const Mat &train_des, vector<DMatch> &good_matches, float check_match_conf);
-void single_match(const Mat &query_des, const Mat &train_des, vector<DMatch> &good_matches, float check_match_conf);
-void getFilePath(const char *path, const char *filename, char *filepath);
-void deleteFile(const char *path);
-bool isFloderexit(const char *path);
-void randomSelectKeyPoints(vector<KeyPoint> kpts, vector<Point2f> &pts, int max_num);
-void optimizeSeam(Mat &last_img, Mat &stitched_image, vector<Point2f> &corners);
-void getLinePara(float x1, float y1, float x2, float y2, LinePara &LP);
-float point_2_line(float k, float b, float k2, float x, float y);
-int get_direction(vector<Point2f> &frame_corners, vector<Point2f> &transpose_corners);
-int dcmp(float x);
-float cross(Point2f a, Point2f b, Point2f c);
-float CPIA(vector<Point2f> a, vector<Point2f> b, int na, int nb);
-float SPIA(vector<Point2f> a, vector<Point2f> b, int na, int nb);
-Point2f get_intersection_point(Point2f a, Point2f b, Point2f c, Point2f d);
-float PolygonArea(vector<Point2f> p, int n);
-float single_quadrangle_iou(vector<Point2f> pts1, vector<Point2f> pts2);
-float single_box_iou(vector<Point2f> pts1, vector<Point2f> pts2);
-void stitch_big_image(Mat frame, vector<float> angles, int direction, int big_frame_index);
-void cylindrical_projection(Mat &img, Mat &output, float angle);
-void fill_contours(vector<vector<Point>> contours, Mat &source_image, Mat &target_image);
-float angle_of_two_vector(Point2f &pt1, Point2f &pt2, Point2f &c);
-void calc_angles(vector<Point2f> &conners);
-
-#endif
-
-#endif

+ 5 - 3
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -42,7 +42,8 @@
 #import "PhotoAlbumListViewController.h"
 #import "PhotoAlbumModel.h"
 
-#import "LenStitcher.h"
+//#import "LenStitcher.h"
+#import <LenzStitchSDK/LenzStitchSDK.h>
 #import "LenzDataManager.h"
 #import "LenzHeader.h"
 #import "LenzCachedResourceModel.h"
@@ -1198,11 +1199,12 @@
         if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
             self.panoramOrientationGuideView.hidden = YES;
             self.ai_fullView.hidden = YES;
+            self.panoramaGuideView.hidden = YES;
         } else {
             self.panoramOrientationGuideView.hidden = isSaveIng;
             self.ai_fullView.hidden = isSaveIng;
+            self.panoramaGuideView.hidden = isSaveIng;
         }
-        self.panoramaGuideView.hidden = isSaveIng;
         self.modeList.hidden = isSaveIng;
         self.savePhotoButton.hidden = isSaveIng;
         self.takePhotoButton.hidden = isSaveIng;
@@ -2506,7 +2508,7 @@
                         dispatch_async(dispatch_get_main_queue(), ^{
                             [base takePhotoButtonTouched];
                             [self stopMotion];
-                            [self takePhotoButtonTouchUpInside:[NSObject new]];
+//                            [self takePhotoButtonTouchUpInside:[NSObject new]];
                             [self removeLastStich];
                             [self updateViewStatusWhenStitchFail];
                             [self.panoramaGuideView clearImage];

+ 1 - 1
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/VideoStitch/LenStitcher.h → SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Headers/LenStitcher.h

@@ -6,10 +6,10 @@
 //
 
 
-#import "lenz_stitch_jni.hpp"
 
 #import <Foundation/Foundation.h>
 #import <CoreMedia/CoreMedia.h>
+#import <UIKit/UIKit.h>
 
 
 typedef NS_ENUM(NSInteger, LenVideoStitchResult) {

+ 19 - 0
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Headers/LenzStitchSDK.h

@@ -0,0 +1,19 @@
+//
+//  LenzStitchSDK.h
+//  LenzStitchSDK
+//
+//  Created by lr on 2023/3/17.
+//
+
+#import <Foundation/Foundation.h>
+
+//! Project version number for LenzStitchSDK.
+FOUNDATION_EXPORT double LenzStitchSDKVersionNumber;
+
+//! Project version string for LenzStitchSDK.
+FOUNDATION_EXPORT const unsigned char LenzStitchSDKVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <LenzStitchSDK/PublicHeader.h>
+
+
+#import <LenzStitchSDK/LenStitcher.h>

BIN
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Info.plist


BIN
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/LenzStitchSDK


+ 6 - 0
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/Modules/module.modulemap

@@ -0,0 +1,6 @@
+framework module LenzStitchSDK {
+  umbrella header "LenzStitchSDK.h"
+
+  export *
+  module * { export * }
+}

BIN
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeDirectory


BIN
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeRequirements


BIN
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeRequirements-1


+ 151 - 0
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeResources

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>files</key>
+	<dict>
+		<key>.DS_Store</key>
+		<data>
+		K0QDhoS0LvMO1hRVdiYhzF+SqBs=
+		</data>
+		<key>Headers/LenStitcher.h</key>
+		<data>
+		rt68LzfniiYGlXHxCHvl0gDZ08c=
+		</data>
+		<key>Headers/LenzStitchSDK.h</key>
+		<data>
+		RMe44eCzrKJTE9nTRD8UO3AB10Q=
+		</data>
+		<key>Info.plist</key>
+		<data>
+		n6WyF8fk/Dh5HVNvsEvKPMpuN2Y=
+		</data>
+		<key>Modules/module.modulemap</key>
+		<data>
+		WpetxLFbzXyTwmmktrKotdo7zs8=
+		</data>
+	</dict>
+	<key>files2</key>
+	<dict>
+		<key>Headers/LenStitcher.h</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			rt68LzfniiYGlXHxCHvl0gDZ08c=
+			</data>
+			<key>hash2</key>
+			<data>
+			oxtbdooI+HgLBH4GVEc+FxMAUQtXRp/nwlw0JGf671E=
+			</data>
+		</dict>
+		<key>Headers/LenzStitchSDK.h</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			RMe44eCzrKJTE9nTRD8UO3AB10Q=
+			</data>
+			<key>hash2</key>
+			<data>
+			0keL/AhXFJfwj55eI7XGoyxjMTKJyDyE8uElkmZoLgw=
+			</data>
+		</dict>
+		<key>Modules/module.modulemap</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			WpetxLFbzXyTwmmktrKotdo7zs8=
+			</data>
+			<key>hash2</key>
+			<data>
+			FIBKRGewcuTDz6f2dsUD7OalWOSW7lvzWGDkQpz1a2A=
+			</data>
+		</dict>
+	</dict>
+	<key>rules</key>
+	<dict>
+		<key>^.*</key>
+		<true/>
+		<key>^.*\.lproj/</key>
+		<dict>
+			<key>optional</key>
+			<true/>
+			<key>weight</key>
+			<real>1000</real>
+		</dict>
+		<key>^.*\.lproj/locversion.plist$</key>
+		<dict>
+			<key>omit</key>
+			<true/>
+			<key>weight</key>
+			<real>1100</real>
+		</dict>
+		<key>^Base\.lproj/</key>
+		<dict>
+			<key>weight</key>
+			<real>1010</real>
+		</dict>
+		<key>^version.plist$</key>
+		<true/>
+	</dict>
+	<key>rules2</key>
+	<dict>
+		<key>.*\.dSYM($|/)</key>
+		<dict>
+			<key>weight</key>
+			<real>11</real>
+		</dict>
+		<key>^(.*/)?\.DS_Store$</key>
+		<dict>
+			<key>omit</key>
+			<true/>
+			<key>weight</key>
+			<real>2000</real>
+		</dict>
+		<key>^.*</key>
+		<true/>
+		<key>^.*\.lproj/</key>
+		<dict>
+			<key>optional</key>
+			<true/>
+			<key>weight</key>
+			<real>1000</real>
+		</dict>
+		<key>^.*\.lproj/locversion.plist$</key>
+		<dict>
+			<key>omit</key>
+			<true/>
+			<key>weight</key>
+			<real>1100</real>
+		</dict>
+		<key>^Base\.lproj/</key>
+		<dict>
+			<key>weight</key>
+			<real>1010</real>
+		</dict>
+		<key>^Info\.plist$</key>
+		<dict>
+			<key>omit</key>
+			<true/>
+			<key>weight</key>
+			<real>20</real>
+		</dict>
+		<key>^PkgInfo$</key>
+		<dict>
+			<key>omit</key>
+			<true/>
+			<key>weight</key>
+			<real>20</real>
+		</dict>
+		<key>^embedded\.provisionprofile$</key>
+		<dict>
+			<key>weight</key>
+			<real>20</real>
+		</dict>
+		<key>^version\.plist$</key>
+		<dict>
+			<key>weight</key>
+			<real>20</real>
+		</dict>
+	</dict>
+</dict>
+</plist>

BIN
SDK/LenzCameraNativeModuleForRN/LenzStitchSDK.framework/_CodeSignature/CodeSignature


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov