lxy 1 gadu atpakaļ
vecāks
revīzija
e67761edc1

+ 2 - 2
Example/Podfile.lock

@@ -1,5 +1,5 @@
 PODS:
-  - LenzSDK (2.3.2):
+  - LenzSDK (2.4.3):
     - Masonry (= 1.1.0)
     - OpenCV2 (~> 4.3.0)
     - SVProgressHUD (~> 2.2.5)
@@ -27,7 +27,7 @@ EXTERNAL SOURCES:
     :path: "../"
 
 SPEC CHECKSUMS:
-  LenzSDK: b4f646beafcf1e367274c023918e2fb5c4305f78
+  LenzSDK: 022505786b85c614e5e300683b9468239b18caee
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   OpenCV2: ffe82e5cb5d16dc3fc01a5f4127b9a5b3cfc7d1b
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6

+ 2 - 2
Example/Pods/Local Podspecs/LenzSDK.podspec.json

@@ -1,6 +1,6 @@
 {
   "name": "LenzSDK",
-  "version": "2.3.2",
+  "version": "2.4.3",
   "summary": "A short description of LenzSDK.",
   "description": "this  is the long description",
   "homepage": "http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git",
@@ -13,7 +13,7 @@
   },
   "source": {
     "git": "http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git",
-    "tag": "2.3.2"
+    "tag": "2.4.3"
   },
   "platforms": {
     "ios": "12.0"

+ 2 - 2
Example/Pods/Manifest.lock

@@ -1,5 +1,5 @@
 PODS:
-  - LenzSDK (2.3.2):
+  - LenzSDK (2.4.3):
     - Masonry (= 1.1.0)
     - OpenCV2 (~> 4.3.0)
     - SVProgressHUD (~> 2.2.5)
@@ -27,7 +27,7 @@ EXTERNAL SOURCES:
     :path: "../"
 
 SPEC CHECKSUMS:
-  LenzSDK: b4f646beafcf1e367274c023918e2fb5c4305f78
+  LenzSDK: 022505786b85c614e5e300683b9468239b18caee
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   OpenCV2: ffe82e5cb5d16dc3fc01a5f4127b9a5b3cfc7d1b
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6

+ 1 - 1
Example/Pods/Target Support Files/LenzSDK/ResourceBundle-LenzCameraNativeModuleForRN-LenzSDK-Info.plist

@@ -13,7 +13,7 @@
   <key>CFBundlePackageType</key>
   <string>BNDL</string>
   <key>CFBundleShortVersionString</key>
-  <string>2.3.2</string>
+  <string>2.4.3</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>CFBundleVersion</key>

+ 8 - 1
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -167,6 +167,7 @@
     [SVProgressHUD setDefaultStyle:SVProgressHUDStyleLight];
     [SVProgressHUD setMinimumDismissTimeInterval:1.5];
     [SVProgressHUD setMaximumDismissTimeInterval:3];
+    [SVProgressHUD dismissWithDelay:.5];
     [SVProgressHUD setFont:[UIFont systemFontOfSize:14]];
     self.stitchResult = -999;
     self.tensorFlow = [[LenzTensorFlow alloc]initWithFileName:@"moire_mobilenetv2_79"];
@@ -3180,7 +3181,13 @@
                     } else if (result == LenVideoStitchResultSlow) {
                         [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"目标物较少,请对准目标物低速且匀速拍摄"];
                         [self saveStitch:model image:image saveImage:saveImage base:base needSave:needSave];
-                    } else {
+                    } else if (result == LenVideoStitchResultModerate) {
+                        [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请减速拍摄"];
+                        [self saveStitch:model image:image saveImage:saveImage base:base needSave:needSave];
+                    } else if (result == LenVideoStitchResultParallel) {
+                        [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请正对目标物平行拍摄"];
+                        [self saveStitch:model image:image saveImage:saveImage base:base needSave:needSave];
+                    } else if (result == LenVideoStitchResultDirectError){
 //                        [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请勿往反方向移动"];
                         [self saveStitch:model image:image saveImage:saveImage base:base needSave:needSave];
                     }

+ 1 - 1
LenzSDK.podspec

@@ -8,7 +8,7 @@
 
 Pod::Spec.new do |s|
   s.name             = 'LenzSDK'
-  s.version          = '2.4.2'
+  s.version          = '2.4.3'
   s.summary          = 'A short description of LenzSDK.'
 
 # This description is used to generate tags and improve search results.

+ 4 - 1
LenzStitchSDK.framework/Headers/LenStitcher.h

@@ -20,7 +20,10 @@ typedef NS_ENUM(NSInteger, LenVideoStitchResult) {
     LenVideoStitchResultSuccess,         //1: 视频拼接成功
     LenVideoStitchResultSlowMore,       // 2:特征点变少,放慢速度
     LenVideoStitchResultSlow,          //3 : 特征点极少,即将失败
-    LenVideoStitchResultDirectError, // 当前拍摄固定了方向,请勿往反方向移动
+    LenVideoStitchResultDirectError, // 4:当前拍摄固定了方向,请勿往反方向移动
+    LenVideoStitchResultModerate,   // 5:请减速拍摄
+    LenVideoStitchResultParallel,  // 6:请正对目标物平行拍摄
+
 };
 
 typedef NS_ENUM(NSInteger, LenVideoStitchNeedSave) {

+ 2 - 0
LenzStitchSDK.framework/Headers/lenz_stitch_jni.hpp

@@ -32,6 +32,8 @@
  *          2: 特征点变少,放慢速度
  *          3: 特征点极少,即将失败
  *          4:当前拍摄固定了方向,请勿往反方向移动
+ *          5:请减速拍摄
+ *          6:请正对目标物平行拍摄
  *       是否需要存图:
  *          0:不需要
  *          1:需要

+ 6 - 3
LenzStitchSDK.framework/Headers/lenz_stitcher.hpp

@@ -47,7 +47,7 @@ struct stitch_data
 {
     Mat scaled_gray_frame;
     float work_scale;
-    vector<KeyPoint> keypoints;
+    vector<Point2f> good_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
     Mat base_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 last base image
@@ -70,6 +70,7 @@ public:
 
     int failed_count = 0;  // 当前连续失败的帧数
     int failed_thresh = 10; // 连续5帧失败才返回失败
+    vector<float> last_move_distances; // 记录存下来的最近10帧的移动距离,算均值,大于阈值的时候提示速度过快
 
     float iou_thresh = 0.7;  // iou低于该阈值的时候把这张图片存下来
     float area_thresh = 0.5; // area threshold for green box
@@ -87,6 +88,7 @@ public:
     Mat last_stitch_image = Mat(); // 最后一张拼接缩略图
     int last_direction = 0;        // 上一帧的手机移动方向
     vector<float> last_angles = vector<float>{90, 90, 90, 90};
+    vector<float> last_scales = vector<float>{1, 1, 1, 1};
     string last_stitch_image_path = ""; // 拼接缩略图的本地路径
     stitch_data last_check_data;        // 上一帧的数据
     string big_stitch_image_path = "";  // 拼接大图的本地路径
@@ -118,6 +120,7 @@ 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);
+float get_move_distance(vector<Point2f> &frame_center, vector<Point2f> &transpose_center);
 int dcmp(float x);
 float cross(Point2f a, Point2f b, Point2f c);
 float CPIA(vector<Point2f> a, vector<Point2f> b, int na, int nb);
@@ -126,13 +129,13 @@ 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 stitch_big_image(Mat frame, vector<float> angles, vector<float> scales, int direction, int big_frame_index);
 void cylindrical_projection(Mat &img, Mat &output, float angle);
+void SphericalProjection(Mat& imgMat, 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

BIN
LenzStitchSDK.framework/LenzStitchSDK


BIN
LenzStitchSDK.framework/_CodeSignature/CodeDirectory


BIN
LenzStitchSDK.framework/_CodeSignature/CodeRequirements-1


+ 9 - 9
LenzStitchSDK.framework/_CodeSignature/CodeResources

@@ -6,7 +6,7 @@
 	<dict>
 		<key>Headers/LenStitcher.h</key>
 		<data>
-		ljX5iTQFL5YQLaqsx3tCFcOmqJY=
+		w3j4zB8oGG58XPUsYdQYf0uMO14=
 		</data>
 		<key>Headers/LenzStitchSDK.h</key>
 		<data>
@@ -14,11 +14,11 @@
 		</data>
 		<key>Headers/lenz_stitch_jni.hpp</key>
 		<data>
-		eHEqnYRibWGq99OMfYh/tNt85zA=
+		oNFxw7ug2R8C17ir9Km6LzTGSuA=
 		</data>
 		<key>Headers/lenz_stitcher.hpp</key>
 		<data>
-		A8S3alqzGWa9zAKR1mtQZBDPstc=
+		Ni+lJR/qcMiOIZUNH/QZIU+qXFI=
 		</data>
 		<key>Info.plist</key>
 		<data>
@@ -35,11 +35,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			ljX5iTQFL5YQLaqsx3tCFcOmqJY=
+			w3j4zB8oGG58XPUsYdQYf0uMO14=
 			</data>
 			<key>hash2</key>
 			<data>
-			UCrQxHSG5OeQT8JJ+Bsj/dt5TMK/EmT9tcXAKV7T2Dk=
+			5VC7boy3NUMKDT9SimGmVjB+OwsOGrxftWjFB0vOhec=
 			</data>
 		</dict>
 		<key>Headers/LenzStitchSDK.h</key>
@@ -57,22 +57,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			eHEqnYRibWGq99OMfYh/tNt85zA=
+			oNFxw7ug2R8C17ir9Km6LzTGSuA=
 			</data>
 			<key>hash2</key>
 			<data>
-			5fADOFBRoq2n70+yLTpvcgewJAj6mBdYeNV7ajolkls=
+			1oaSfT9ERNb+tD11tDtQuMyTO7NkGjzSqBEMilJjJ8Q=
 			</data>
 		</dict>
 		<key>Headers/lenz_stitcher.hpp</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			A8S3alqzGWa9zAKR1mtQZBDPstc=
+			Ni+lJR/qcMiOIZUNH/QZIU+qXFI=
 			</data>
 			<key>hash2</key>
 			<data>
-			DtF2/KVgCGICzVxE8MASuJz6srILU91n1Ri4feqpjIY=
+			un0w274O7ySRTuYBwD3Wz0m+vPagWRU6COSjW5RkCp4=
 			</data>
 		</dict>
 		<key>Modules/module.modulemap</key>

BIN
LenzStitchSDK.framework/_CodeSignature/CodeSignature