{"id":54200,"date":"2025-08-12T23:49:43","date_gmt":"2025-08-12T15:49:43","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/54200.html"},"modified":"2025-08-12T23:49:43","modified_gmt":"2025-08-12T15:49:43","slug":"%e5%9b%be%e7%89%87%e6%8b%bc%e6%8e%a5-%e5%8a%a8%e6%89%8b%e5%ad%a6%e8%ae%a1%e7%ae%97%e6%9c%ba%e8%a7%86%e8%a7%898","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/54200.html","title":{"rendered":"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u56fe\u7247\u62fc\u63a5&#xff08;image stitching&#xff09;\u5c31\u662f\u5c06\u7edf\u4e00\u573a\u666f\u7684\u4e0d\u540c\u62cd\u6444\u51fa\u7684\u56fe\u7247\u62fc\u63a5\u5230\u4e00\u8d77&#xff0c;\u5982\u56fe\u6240\u793a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"665\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812154937-689b629184276.png\" width=\"1068\" \/>\u5c31\u662f\u62fc\u63a5\u5168\u666f\u56fe&#xff0c;\u662f\u56fe\u7247\u62fc\u63a5\u7684\u5e94\u7528\u4e4b\u4e00&#xff0c;\u624b\u673a\u62cd\u7167\u90fd\u6709\u5168\u666f\u62cd\u6444\u529f\u80fd<\/p>\n<p>\u4ed4\u7ec6\u89c2\u5bdf\u5168\u666f\u56fe&#xff0c;\u5bfb\u627e\u5b83\u4eec\u76f8\u4f3c\u6027&#xff0c;\u56fe8-2\u7684\u5168\u666f\u56fe\u53ef\u4ee5\u901a\u8fc7\u7f29\u653e&#xff0c;\u65cb\u8f6c&#xff0c;\u5c04\u5f71\u7b49\u64cd\u4f5c\u8fdb\u884c\u62fc\u63a5\u800c\u6210&#xff0c;\u6211\u4eec\u9996\u5148\u4ecb\u7ecd\u51e0\u4e2a\u5e38\u7528\u7684\u56fe\u50cf\u53d8\u6362<\/p>\n<\/p>\n<h3>\u56fe\u50cf\u53d8\u6362<\/h3>\n<\/p>\n<h4>\u5e73\u79fb\u53d8\u6362<\/h4>\n<p>\u5e73\u79fb\u53d8\u6362\u901a\u8fc7\u5411\u91cf ( \\\\mathbf{t} &#061; (t_x, t_y) ) \u5b9e\u73b0&#xff0c;\u56fe\u50cf\u4e0a\u70b9 ( \\\\mathbf{p} &#061; (i, j) ) \u5e73\u79fb\u540e\u5f97\u5230\u65b0\u70b9 ( \\\\mathbf{p}&#039; &#061; (i&#039;, j&#039;) )&#xff0c;\u6ee1\u8db3&#xff1a; [ \\\\mathbf{p}&#039; &#061; \\\\mathbf{p} &#043; \\\\mathbf{t} ] \u5176\u4e2d ( t_x ) \u548c ( t_y ) \u5206\u522b\u8868\u793a\u6c34\u5e73\u548c\u5782\u76f4\u65b9\u5411\u7684\u5e73\u79fb\u8ddd\u79bb\u3002<\/p>\n<h4>\u65cb\u8f6c\u53d8\u6362<\/h4>\n<p>\u65cb\u8f6c\u53d8\u6362\u7ed5\u539f\u70b9\u9006\u65f6\u9488\u65cb\u8f6c\u89d2\u5ea6 ( \\\\theta )&#xff0c;\u70b9 ( \\\\mathbf{p} &#061; (i, j) ) \u65cb\u8f6c\u540e\u5f97\u5230 ( \\\\mathbf{p}&#039; &#061; R\\\\mathbf{p} )&#xff0c;\u65cb\u8f6c\u77e9\u9635 ( R ) \u4e3a&#xff1a; [ R &#061; \\\\begin{bmatrix} \\\\cos \\\\theta &amp; -\\\\sin \\\\theta \\\\ \\\\sin \\\\theta &amp; \\\\cos \\\\theta \\\\end{bmatrix} ]<\/p>\n<h4>\u7f29\u653e\u53d8\u6362<\/h4>\n<p>\u4ee5\u539f\u70b9\u4e3a\u4e2d\u5fc3&#xff0c;\u6cbf ( x ) \u8f74\u7f29\u653e ( s_x ) \u500d&#xff0c;\u6cbf ( y ) \u8f74\u7f29\u653e ( s_y ) \u500d&#xff0c;\u70b9 ( \\\\mathbf{p} &#061; (i, j) ) \u7f29\u653e\u540e\u5f97\u5230 ( \\\\mathbf{p}&#039; &#061; S\\\\mathbf{p} )&#xff0c;\u7f29\u653e\u77e9\u9635 ( S ) \u4e3a&#xff1a; [ S &#061; \\\\begin{bmatrix} s_x &amp; 0 \\\\ 0 &amp; s_y \\\\end{bmatrix} ]<\/p>\n<h4>\u5bf9\u79f0\u53d8\u6362<\/h4>\n<ul>\n<li>\u5173\u4e8e ( y ) \u8f74\u5bf9\u79f0&#xff1a;\u70b9 ( \\\\mathbf{p} &#061; (i, j) ) \u53d8\u6362\u540e\u4e3a ( \\\\mathbf{p}&#039; &#061; (-i, j) )&#xff0c;\u5bf9\u5e94\u77e9\u9635&#xff1a; [ P_y &#061; \\\\begin{bmatrix} -1 &amp; 0 \\\\ 0 &amp; 1 \\\\end{bmatrix} ]<\/li>\n<li>\u5173\u4e8e\u76f4\u7ebf ( y &#061; x ) \u5bf9\u79f0&#xff1a;\u70b9 ( \\\\mathbf{p} &#061; (i, j) ) \u53d8\u6362\u540e\u4e3a ( \\\\mathbf{p}&#039; &#061; (j, i) )&#xff0c;\u5bf9\u5e94\u77e9\u9635&#xff1a; [ P_{y&#061;x} &#061; \\\\begin{bmatrix} 0 &amp; 1 \\\\ 1 &amp; 0 \\\\end{bmatrix} ]<\/li>\n<\/ul>\n<h4>\u5c04\u5f71\u53d8\u6362&#xff08;\u900f\u89c6\u53d8\u6362&#xff09;<\/h4>\n<p>\u5c04\u5f71\u53d8\u6362\u662f\u66f4\u4e00\u822c\u7684\u7ebf\u6027\u53d8\u6362&#xff0c;\u53ef\u7528\u9f50\u6b21\u5750\u6807\u8868\u793a\u3002\u5bf9\u4e8e\u70b9 ( \\\\mathbf{p} &#061; (i, j, 1) )&#xff08;\u9f50\u6b21\u5750\u6807&#xff09;&#xff0c;\u53d8\u6362\u540e ( \\\\mathbf{p}&#039; &#061; H\\\\mathbf{p} )&#xff0c;\u5176\u4e2d ( H ) \u4e3a ( 3 \\\\times 3 ) \u53d8\u6362\u77e9\u9635&#xff1a; [ H &#061; \\\\begin{bmatrix} h_{11} &amp; h_{12} &amp; h_{13} \\\\ h_{21} &amp; h_{22} &amp; h_{23} \\\\ h_{31} &amp; h_{32} &amp; h_{33} \\\\end{bmatrix} ] \u5c04\u5f71\u53d8\u6362\u80fd\u5b9e\u73b0\u503e\u659c\u3001\u900f\u89c6\u7b49\u590d\u6742\u51e0\u4f55\u53d8\u6362\u3002<\/p>\n<h4>\u51e0\u4f55\u76f8\u4f3c\u6027\u5206\u6790<\/h4>\n<p>\u56fe8-1\u7684\u5b50\u56fe\u4e0e\u56fe8-2\u5168\u666f\u56fe\u7684\u76f8\u4f3c\u6027\u4f53\u73b0\u5728&#xff1a;<\/p>\n<li>\u5c40\u90e8\u4e0e\u5168\u5c40\u5173\u7cfb&#xff1a;\u5b50\u56fe\u901a\u8fc7\u4e0a\u8ff0\u53d8\u6362&#xff08;\u5e73\u79fb\u3001\u65cb\u8f6c\u3001\u7f29\u653e\u3001\u5c04\u5f71&#xff09;\u53ef\u62fc\u63a5\u4e3a\u5168\u666f\u56fe\u3002<\/li>\n<li>\u51e0\u4f55\u4e00\u81f4\u6027&#xff1a;\u53d8\u6362\u540e\u7684\u5b50\u56fe\u8fb9\u7f18\u5bf9\u9f50\u3001\u89c6\u89d2\u8fde\u8d2f&#xff0c;\u6ee1\u8db3\u51e0\u4f55\u7ea6\u675f&#xff08;\u5982\u7279\u5f81\u70b9\u5339\u914d&#xff09;\u3002<\/li>\n<li>\u53d8\u6362\u7ec4\u5408&#xff1a;\u5b9e\u9645\u62fc\u63a5\u4e2d\u5e38\u7ec4\u5408\u591a\u79cd\u53d8\u6362&#xff0c;\u4f8b\u5982\u5148\u65cb\u8f6c\u540e\u5e73\u79fb&#xff0c;\u6216\u5c04\u5f71\u6821\u6b63\u900f\u89c6\u5dee\u5f02\u3002<\/li>\n<h4>\u6570\u5b66\u8868\u8fbe\u7edf\u4e00\u6027<\/h4>\n<p>\u6240\u6709\u53d8\u6362\u5747\u53ef\u8868\u793a\u4e3a\u77e9\u9635\u4e58\u6cd5&#xff08;\u9f50\u6b21\u5750\u6807\u4e0b&#xff09;&#xff1a; [ \\\\mathbf{p}&#039; &#061; M\\\\mathbf{p} ] \u5176\u4e2d ( M ) \u4e3a\u5bf9\u5e94\u53d8\u6362\u77e9\u9635\u3002\u5e73\u79fb\u9700\u6269\u5c55\u4e3a\u4eff\u5c04\u53d8\u6362&#xff1a; [ M_{\\\\text{\u5e73\u79fb}} &#061; \\\\begin{bmatrix} 1 &amp; 0 &amp; t_x \\\\ 0 &amp; 1 &amp; t_y \\\\ 0 &amp; 0 &amp; 1 \\\\end{bmatrix} ]<\/p>\n<h3>\u8ba1\u7b97\u53d8\u5316\u77e9\u9635<\/h3>\n<p>1.\u901a\u8fc7SIFT\u8ba1\u7b97\u51fa\u4e24\u5e45\u56fe\u7247\u7684\u7279\u5f81\u70b9<\/p>\n<p>2.\u5c06\u4e24\u5e45\u56fe\u7247\u7684\u7279\u5f81\u70b9\u8fdb\u884c\u5339\u914d<\/p>\n<p>3.\u66f4\u5177\u5339\u914d\u7684\u7279\u5f81\u70b9\u8ba1\u7b97\u56fe\u7247\u53d8\u6362\u77e9\u9635<\/p>\n<h3>\u5229\u7528RANSAC\u7b97\u6cd5\u53bb\u9664\u8bef\u5339\u914d<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"442\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812154940-689b6294da4d2.png\" width=\"922\" \/><br \/>\n\u5f53\u5229\u7528SIFT\u8fdb\u884c\u7279\u5f81\u5339\u914d\u65f6&#xff0c;\u6709\u4e9b\u65f6\u5019\u53ef\u80fd\u4f1a\u51fa\u73b0\u56fe8-6\u7684\u60c5\u51b5\u3002\u56fe8-6\u4e2d\u53f3\u56fe\u7eff\u8272\u5706\u5708<br \/>\n\u5185\u7684\u7279\u5f81\u70b9\u662f\u4e0e\u5de6\u56fe\u5339\u914d\u7684\u7279\u5f81\u70b9&#xff0c;\u4f46\u5229\u7528SIFT\u5339\u914d\u7279\u5f81\u70b9\u65f6&#xff0c;\u4f1a\u5c06\u5de6\u56fe\u4e2d\u90e8\u5206\u7279\u5f81\u70b9\u5339\u914d\u5230<br \/>\n\u53f3\u56fe\u7eff\u8272\u5706\u5708\u4e4b\u5916\u7684\u7279\u5f81\u70b9&#xff08;\u5982\u7ea2\u8272\u5706\u5708\u5185\u7684\u7279\u5f81\u70b9&#xff09;\u3002\u8fd9\u4e9b\u7279\u5f81\u70b9\u5339\u914d\u662f\u9519\u8bef\u7684\u5339\u914d&#xff0c;\u5e94\u8be5\u88ab<br \/>\n\u79fb\u9664&#xff0c;\u4ece\u800c\u4fdd\u8bc1\u53d8\u6362\u77e9\u9635\u8ba1\u7b97\u7684\u9c81\u68d2\u6027\u3002\u5e94\u8be5\u5982\u4f55\u79fb\u9664\u9519\u8bef\u7684\u5339\u914d\u70b9\u5bf9\u5462&#xff1f;<\/p>\n<p>\u53ef\u4ee5\u7528\u5230RANSAC\u7b97\u6cd5<\/p>\n<h4>RANSAC\u7b97\u6cd5\u7b80\u4ecb<\/h4>\n<p>RANSAC&#xff08;Random Sample Consensus&#xff09;\u662f\u4e00\u79cd\u9c81\u68d2\u7684\u6a21\u578b\u62df\u5408\u7b97\u6cd5&#xff0c;\u5e38\u7528\u4e8e\u5904\u7406\u5305\u542b\u5927\u91cf\u566a\u58f0\u6216\u5f02\u5e38\u503c\u7684\u6570\u636e\u3002\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u4e2d&#xff0c;RANSAC\u5e38\u7528\u4e8e\u53bb\u9664\u7279\u5f81\u5339\u914d\u4e2d\u7684\u8bef\u5339\u914d&#xff08;outliers&#xff09;&#xff0c;\u4ec5\u4fdd\u7559\u6ee1\u8db3\u51e0\u4f55\u7ea6\u675f\u7684\u6b63\u786e\u5339\u914d&#xff08;inliers&#xff09;\u3002<\/p>\n<h4>\u7b97\u6cd5\u539f\u7406<\/h4>\n<p>RANSAC\u901a\u8fc7\u968f\u673a\u91c7\u6837\u6700\u5c0f\u6570\u636e\u96c6\u8fed\u4ee3\u4f30\u8ba1\u6a21\u578b\u53c2\u6570&#xff0c;\u5e76\u7edf\u8ba1\u652f\u6301\u8be5\u6a21\u578b\u7684\u6837\u672c\u6570\u91cf\u3002\u7b97\u6cd5\u6838\u5fc3\u601d\u60f3\u662f&#xff1a;\u6b63\u786e\u7684\u5339\u914d\u5e94\u6ee1\u8db3\u67d0\u79cd\u51e0\u4f55\u53d8\u6362&#xff08;\u5982\u5355\u5e94\u6027\u77e9\u9635\u6216\u57fa\u7840\u77e9\u9635&#xff09;&#xff0c;\u800c\u8bef\u5339\u914d\u5219\u4e0d\u7b26\u5408\u8be5\u7ea6\u675f\u3002<\/p>\n<h4>\u5b9e\u73b0\u6b65\u9aa4<\/h4>\n<p>\u8f93\u5165\u51c6\u5907<\/p>\n<ul>\n<li>\u4e24\u7ec4\u5339\u914d\u7684\u7279\u5f81\u70b9\u5bf9&#xff1a;points1\u548cpoints2&#xff08;\u5f62\u72b6\u4e3aN\u00d72\u7684\u6570\u7ec4&#xff09;<\/li>\n<li>\u6a21\u578b\u7c7b\u578b&#xff1a;\u5355\u5e94\u6027\u77e9\u9635&#xff08;Homography&#xff09;\u6216\u57fa\u7840\u77e9\u9635&#xff08;Fundamental Matrix&#xff09;<\/li>\n<li>\u6700\u5927\u8fed\u4ee3\u6b21\u6570&#xff1a;max_iterations&#xff08;\u9ed8\u8ba41000&#xff09;<\/li>\n<li>\u5185\u70b9\u9608\u503c&#xff1a;threshold&#xff08;\u50cf\u7d20\u8ddd\u79bb&#xff0c;\u9ed8\u8ba43.0&#xff09;<\/li>\n<\/ul>\n<p>\u6838\u5fc3\u6d41\u7a0b<\/p>\n<li>\u968f\u673a\u4ece\u5339\u914d\u70b9\u5bf9\u4e2d\u9009\u53d6\u6700\u5c0f\u6837\u672c\u96c6&#xff08;\u5982\u5355\u5e94\u6027\u77e9\u9635\u97004\u5bf9\u70b9&#xff09;<\/li>\n<li>\u6839\u636e\u6837\u672c\u96c6\u8ba1\u7b97\u5019\u9009\u6a21\u578b\u53c2\u6570&#xff08;\u5982\u8c03\u7528cv2.findHomography&#xff09;<\/li>\n<li>\u7edf\u8ba1\u6240\u6709\u70b9\u5728\u8be5\u6a21\u578b\u4e0b\u7684\u6295\u5f71\u8bef\u5dee\u5c0f\u4e8e\u9608\u503c\u7684\u5185\u70b9\u6570\u91cf<\/li>\n<li>\u4fdd\u7559\u5185\u70b9\u6570\u91cf\u6700\u591a\u7684\u6a21\u578b\u53c2\u6570<\/li>\n<li>\u91cd\u590d\u4e0a\u8ff0\u8fc7\u7a0b\u76f4\u5230\u8fbe\u5230\u6700\u5927\u8fed\u4ee3\u6b21\u6570<\/li>\n<h4>OpenCV\u4ee3\u7801\u5b9e\u73b0<\/h4>\n<p>import cv2<br \/>\nimport numpy as np<\/p>\n<p>def ransac_filter_matches(points1, points2, model&#061;&#039;homography&#039;, max_iter&#061;1000, threshold&#061;3.0):<br \/>\n    &#034;&#034;&#034;<br \/>\n    points1, points2: \u5339\u914d\u7684\u70b9\u5750\u6807 (N\u00d72 numpy\u6570\u7ec4)<br \/>\n    model: \u62df\u5408\u6a21\u578b\u7c7b\u578b (&#039;homography&#039; \u6216 &#039;fundamental&#039;)<br \/>\n    &#034;&#034;&#034;<br \/>\n    if len(points1) &lt; 4:<br \/>\n        return np.arange(len(points1))  # \u4e0d\u8db34\u5bf9\u70b9\u65f6\u8fd4\u56de\u6240\u6709\u7d22\u5f15<\/p>\n<p>    if model &#061;&#061; &#039;homography&#039;:<br \/>\n        H, mask &#061; cv2.findHomography(points1, points2, cv2.RANSAC, threshold, maxIters&#061;max_iter)<br \/>\n    elif model &#061;&#061; &#039;fundamental&#039;:<br \/>\n        F, mask &#061; cv2.findFundamentalMat(points1, points2, cv2.FM_RANSAC, threshold, max_iter)<\/p>\n<p>    return mask.ravel().astype(bool)  # \u8fd4\u56de\u5185\u70b9\u63a9\u7801<\/p>\n<h4>\u53c2\u6570\u9009\u62e9\u5efa\u8bae<\/h4>\n<ul>\n<li>\n<p>\u9608\u503c\u9009\u62e9&#xff1a;\u901a\u5e38\u8bbe\u7f6e\u4e3a1-5\u50cf\u7d20&#xff0c;\u53d6\u51b3\u4e8e\u7279\u5f81\u70b9\u5b9a\u4f4d\u7cbe\u5ea6\u3002\u5bf9\u4e8eSIFT\/SURF\u7b49\u7279\u5f81\u53ef\u8bbe\u4e3a3&#xff0c;ORB\u7b49\u4e8c\u8fdb\u5236\u7279\u5f81\u5efa\u8bae\u8bbe\u4e3a5<\/p>\n<\/li>\n<li>\n<p>\u8fed\u4ee3\u6b21\u6570&#xff1a;\u9ed8\u8ba41000\u6b21\u53ef\u6ee1\u8db3\u5927\u591a\u6570\u573a\u666f\u3002\u53ef\u901a\u8fc7\u516c\u5f0f\u4f30\u7b97&#xff1a;<\/p>\n<p>$$ N &#061; \\\\frac{\\\\log(1-p)}{\\\\log(1-(1-\\\\epsilon)^s)} $$<\/p>\n<p>\u5176\u4e2dp\u4e3a\u7f6e\u4fe1\u5ea6&#xff08;\u59820.99&#xff09;&#xff0c;\u03b5\u4e3a\u5f02\u5e38\u503c\u6bd4\u4f8b\u4f30\u8ba1\u503c&#xff0c;s\u4e3a\u6700\u5c0f\u6837\u672c\u6570<\/p>\n<\/li>\n<\/ul>\n<h4>\u5e94\u7528\u793a\u4f8b<\/h4>\n<p># \u5047\u8bbe\u5df2\u6709\u5339\u914d\u7ed3\u679c<br \/>\nmatches &#061; flann.knnMatch(des1, des2, k&#061;2)<br \/>\ngood_matches &#061; [m for m,n in matches if m.distance &lt; 0.7*n.distance]<\/p>\n<p># \u63d0\u53d6\u5339\u914d\u70b9\u5750\u6807<br \/>\npts1 &#061; np.float32([kp1[m.queryIdx].pt for m in good_matches]).reshape(-1,2)<br \/>\npts2 &#061; np.float32([kp2[m.trainIdx].pt for m in good_matches]).reshape(-1,2)<\/p>\n<p># RANSAC\u8fc7\u6ee4<br \/>\ninlier_mask &#061; ransac_filter_matches(pts1, pts2)<br \/>\nfinal_matches &#061; [good_matches[i] for i in range(len(good_matches)) if inlier_mask[i]]<\/p>\n<h4>\u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>\u5339\u914d\u70b9\u5bf9\u6570\u91cf\u8f83\u5c11\u65f6&#xff08;&lt;10&#xff09;&#xff0c;RANSAC\u53ef\u80fd\u5931\u6548<\/li>\n<li>\u573a\u666f\u4e2d\u5b58\u5728\u591a\u4e2a\u8fd0\u52a8\u5e73\u9762\u65f6&#xff0c;\u9700\u6539\u7528\u591a\u6a21\u578b\u62df\u5408\u65b9\u6cd5&#xff08;\u5982PEARL&#xff09;<\/li>\n<li>\u5bf9\u4e8e\u7eaf\u65cb\u8f6c\u76f8\u673a\u8fd0\u52a8&#xff0c;\u5efa\u8bae\u4f7f\u7528\u5355\u5e94\u6027\u77e9\u9635&#xff1b;\u4e00\u822c\u8fd0\u52a8\u5efa\u8bae\u7528\u57fa\u7840\u77e9\u9635<\/li>\n<\/ul>\n<h3>\u56fe\u50cf\u53d8\u6362\u4e0e\u7f1d\u5408<\/h3>\n<p>\u56fe\u50cf\u62fc\u63a5\u7684\u6700\u540e\u4e00\u6b65\u662f\u5c06\u8f93\u5165\u56fe\u50cf\u53d8\u6362\u5e76\u7f1d\u5408\u5230\u4e00\u5e45\u56fe\u50cf\u4e2d\u3002\u5bf9\u4e8e\u4e24\u5e45\u56fe\u50cfA\u548cB&#xff0c;\u5728\u5df2<br \/>\n\u7ecf\u68c0\u6d4b\u51fa\u5bf9\u5e94\u7684\u7279\u5f81\u70b9\u5bf9&#xff0c;\u5e76\u5229\u7528RANSAC\u7b97\u6cd5\u8ba1\u7b97\u5f97\u5230\u53d8\u6362\u77e9\u9635T\u4e4b\u540e&#xff0c;\u5c06\u56fe\u50cfB\u8f6c\u6362\u4e3a<br \/>\nTB\u3002\u7136\u540e&#xff0c;\u5bf9\u8f6c\u6362\u540e\u7684\u56fe\u50cf&#xff0c;\u5373TB&#xff0c;\u4e0e\u56fe\u50cfA\u5728\u91cd\u53e0\u90e8\u5206\u7684\u50cf\u7d20\u503c\u6c42\u5e73\u5747\u503c&#xff0c;\u4ee5\u4f18\u5316\u56fe\u50cf\u7f1d<br \/>\n\u5408\u7684\u8fb9\u754c\u3002\u5982\u6b64&#xff0c;\u4fbf\u53ef\u5f97\u5230\u6700\u7ec8\u7f1d\u5408\u597d\u7684\u62fc\u63a5\u56fe\u50cf\u3002<br \/>\n\u7efc\u4e0a\u6240\u8ff0&#xff0c;\u6211\u4eec\u628a\u56fe\u50cf\u62fc\u63a5\u7684\u5168\u8fc7\u7a0b\u603b\u7ed3\u4e3a\u4ee5\u4e0b4\u6b65&#xff1a;<br \/>\n&#xff08;1&#xff09;\u8ba1\u7b97\u4e24\u5e45\u56fe\u50cf\u7684\u7279\u5f81\u70b9&#xff1b;<br \/>\n&#xff08;2&#xff09;\u5c06\u4e24\u5e45\u56fe\u50cf\u7684\u7279\u5f81\u70b9\u8fdb\u884c\u5339\u914d&#xff1b;<br \/>\n&#xff08;3&#xff09;\u6839\u636e\u5339\u914d\u7684\u7279\u5f81\u70b9\u5bf9&#xff0c;\u5229\u7528RANSAC\u7b97\u6cd5\u8ba1\u7b97\u56fe\u50cf\u53d8\u6362\u77e9\u9635&#xff1b;<br \/>\n&#xff08;4&#xff09;\u5c06\u56fe\u50cf\u8fdb\u884c\u62fc\u63a5\u3002<\/p>\n<h3>\u4ee3\u7801\u5b9e\u73b0<\/h3>\n<h4>\u65b9\u6cd5\u4e00&#xff1a;\u4f7f\u7528OpenCV\u5185\u7f6e\u7684Stitcher\u7c7b&#xff08;\u6700\u7b80\u5355&#xff09;<\/h4>\n<p>import cv2<\/p>\n<p># \u8bfb\u53d6\u56fe\u50cf<br \/>\nimage1 &#061; cv2.imread(&#039;image1.jpeg&#039;)<br \/>\nimage2 &#061; cv2.imread(&#039;image2.jpeg&#039;)<\/p>\n<p># \u68c0\u67e5\u56fe\u50cf\u662f\u5426\u6210\u529f\u8bfb\u53d6<br \/>\nif image1 is None or image2 is None:<br \/>\n    print(&#034;\u65e0\u6cd5\u8bfb\u53d6\u56fe\u50cf\u6587\u4ef6&#034;)<br \/>\n    exit()<\/p>\n<p># \u521b\u5efa\u62fc\u63a5\u5668 \u6548\u679c&#xff1a;\u62fc\u63a5\u7ed3\u679c\u51fa\u73b0\u4e86\u8fb9\u7f18\u9ed1\u8fb9\u548c\u5f62\u53d8<br \/>\nstitcher &#061; cv2.Stitcher_create() if hasattr(cv2, &#039;Stitcher_create&#039;) else cv2.createStitcher()<\/p>\n<p># \u6267\u884c\u62fc\u63a5<br \/>\n(status, stitched) &#061; stitcher.stitch([image1, image2])<\/p>\n<p># \u4fdd\u5b58\u7ed3\u679c<br \/>\nif status &#061;&#061; cv2.Stitcher_OK:<br \/>\n    cv2.imwrite(&#039;stitched_output.jpg&#039;, stitched)<br \/>\n    print(&#034;\u62fc\u63a5\u6210\u529f&#xff0c;\u7ed3\u679c\u5df2\u4fdd\u5b58\u4e3a &#039;stitched_output.jpg&#039;&#034;)<br \/>\nelse:<br \/>\n    print(f&#039;\u62fc\u63a5\u5931\u8d25&#xff0c;\u9519\u8bef\u4ee3\u7801: {status}&#039;)<\/p>\n<h4>\u65b9\u6cd5\u4e8c&#xff1a;\u5b8c\u6574\u5b9e\u73b0<\/h4>\n<p>import cv2<br \/>\nimport numpy as np<\/p>\n<p>def stitch_images(images, ratio&#061;0.75, reproj_thresh&#061;4.0, show_matches&#061;False):<br \/>\n    &#034;&#034;&#034;<br \/>\n    \u56fe\u50cf\u62fc\u63a5\u51fd\u6570<\/p>\n<p>    \u53c2\u6570:<br \/>\n        images: \u8981\u62fc\u63a5\u7684\u56fe\u50cf\u5217\u8868<br \/>\n        ratio: Lowe&#039;s ratio test\u53c2\u6570<br \/>\n        reproj_thresh: RANSAC\u91cd\u6295\u5f71\u9608\u503c<br \/>\n        show_matches: \u662f\u5426\u663e\u793a\u7279\u5f81\u5339\u914d\u7ed3\u679c<\/p>\n<p>    \u8fd4\u56de:<br \/>\n        \u62fc\u63a5\u540e\u7684\u56fe\u50cf<br \/>\n    &#034;&#034;&#034;<br \/>\n    # \u521d\u59cb\u5316OpenCV\u7684SIFT\u7279\u5f81\u68c0\u6d4b\u5668<br \/>\n    sift &#061; cv2.SIFT_create()<\/p>\n<p>    # \u68c0\u6d4b\u5173\u952e\u70b9\u548c\u63cf\u8ff0\u7b26<br \/>\n    (kpsA, featuresA) &#061; sift.detectAndCompute(images[0], None)<br \/>\n    (kpsB, featuresB) &#061; sift.detectAndCompute(images[1], None)<\/p>\n<p>    # \u5339\u914d\u7279\u5f81\u70b9<br \/>\n    matcher &#061; cv2.DescriptorMatcher_create(&#034;BruteForce&#034;)<br \/>\n    raw_matches &#061; matcher.knnMatch(featuresA, featuresB, 2)<\/p>\n<p>    # \u5e94\u7528Lowe&#039;s ratio test\u7b5b\u9009\u597d\u7684\u5339\u914d\u70b9<br \/>\n    good_matches &#061; []<br \/>\n    for m in raw_matches:<br \/>\n        if len(m) &#061;&#061; 2 and m[0].distance &lt; m[1].distance * ratio:<br \/>\n            good_matches.append((m[0].trainIdx, m[0].queryIdx))<\/p>\n<p>    # \u81f3\u5c11\u9700\u89814\u4e2a\u5339\u914d\u70b9\u624d\u80fd\u8ba1\u7b97\u5355\u5e94\u6027\u77e9\u9635<br \/>\n    if len(good_matches) &gt; 4:<br \/>\n        ptsA &#061; np.float32([kpsA[i].pt for (_, i) in good_matches])<br \/>\n        ptsB &#061; np.float32([kpsB[i].pt for (i, _) in good_matches])<\/p>\n<p>        # \u8ba1\u7b97\u5355\u5e94\u6027\u77e9\u9635<br \/>\n        (H, status) &#061; cv2.findHomography(ptsA, ptsB, cv2.RANSAC, reproj_thresh)<\/p>\n<p>        # \u62fc\u63a5\u56fe\u50cf<br \/>\n        result &#061; cv2.warpPerspective(images[0], H,<br \/>\n                                    (images[0].shape[1] &#043; images[1].shape[1],<br \/>\n                                     images[0].shape[0]))<br \/>\n        result[0:images[1].shape[0], 0:images[1].shape[1]] &#061; images[1]<\/p>\n<p>        # \u5982\u679c\u9700\u8981\u663e\u793a\u5339\u914d\u7ed3\u679c<br \/>\n        if show_matches:<br \/>\n            vis &#061; np.zeros((max(images[0].shape[0], images[1].shape[0]),<br \/>\n                           images[0].shape[1] &#043; images[1].shape[1], 3), dtype&#061;np.uint8)<br \/>\n            vis[0:images[0].shape[0], 0:images[0].shape[1]] &#061; images[0]<br \/>\n            vis[0:images[1].shape[0], images[0].shape[1]:] &#061; images[1]<\/p>\n<p>            for ((trainIdx, queryIdx), s) in zip(good_matches, status):<br \/>\n                if s &#061;&#061; 1:<br \/>\n                    ptA &#061; (int(kpsA[queryIdx].pt[0]), int(kpsA[queryIdx].pt[1]))<br \/>\n                    ptB &#061; (int(kpsB[trainIdx].pt[0]) &#043; images[0].shape[1],<br \/>\n                           int(kpsB[trainIdx].pt[1]))<br \/>\n                    cv2.line(vis, ptA, ptB, (0, 255, 0), 1)<\/p>\n<p>            cv2.imshow(&#034;Feature Matches&#034;, vis)<br \/>\n            cv2.waitKey(0)<br \/>\n            cv2.destroyAllWindows()<\/p>\n<p>        return result<\/p>\n<p>    return None<\/p>\n<p># \u793a\u4f8b\u7528\u6cd5<br \/>\nif __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    # \u8bfb\u53d6\u4e24\u5f20\u8981\u62fc\u63a5\u7684\u56fe\u50cf<br \/>\n    image1 &#061; cv2.imread(&#034;image1.jpeg&#034;)<br \/>\n    image2 &#061; cv2.imread(&#034;image2.jpeg&#034;)<\/p>\n<p>    # \u786e\u4fdd\u56fe\u50cf\u8bfb\u53d6\u6210\u529f<br \/>\n    if image1 is None or image2 is None:<br \/>\n        print(&#034;\u65e0\u6cd5\u8bfb\u53d6\u56fe\u50cf\u6587\u4ef6&#034;)<br \/>\n        exit()<\/p>\n<p>    # \u8c03\u6574\u56fe\u50cf\u5927\u5c0f(\u53ef\u9009)<br \/>\n    image1 &#061; cv2.resize(image1, (0, 0), fx&#061;0.5, fy&#061;0.5)<br \/>\n    image2 &#061; cv2.resize(image2, (0, 0), fx&#061;0.5, fy&#061;0.5)<\/p>\n<p>    # \u62fc\u63a5\u56fe\u50cf<br \/>\n    stitched_image &#061; stitch_images([image1, image2], show_matches&#061;True)<\/p>\n<p>    if stitched_image is not None:<br \/>\n        # \u663e\u793a\u5e76\u4fdd\u5b58\u7ed3\u679c<br \/>\n        cv2.imshow(&#034;Stitched Image&#034;, stitched_image)<br \/>\n        cv2.waitKey(0)<br \/>\n        cv2.destroyAllWindows()<br \/>\n        cv2.imwrite(&#034;stitched_result.jpg&#034;, stitched_image)<br \/>\n    else:<br \/>\n        print(&#034;\u56fe\u50cf\u62fc\u63a5\u5931\u8d25&#xff0c;\u53ef\u80fd\u5339\u914d\u70b9\u4e0d\u8db3&#034;)<\/p>\n<h4>\u4f7f\u7528\u5efa\u8bae<\/h4>\n<ul>\n<li>\u5982\u679c\u53ea\u662f\u9700\u8981\u5feb\u901f\u62fc\u63a5&#xff0c;\u63a8\u8350\u4f7f\u7528\u7b2c\u4e00\u79cd\u65b9\u6cd5&#xff08;Stitcher\u7c7b&#xff09;<\/li>\n<li>\u5982\u679c\u9700\u8981\u4e86\u89e3\u57fa\u672c\u539f\u7406\u6216\u8fdb\u884c\u7b80\u5355\u5b9a\u5236&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e8c\u79cd\u65b9\u6cd5<\/li>\n<li>\u786e\u4fdd\u56fe\u50cf\u6709\u8db3\u591f\u91cd\u53e0\u533a\u57df&#xff08;\u5efa\u8bae30%\u4ee5\u4e0a\u91cd\u53e0&#xff09;<\/li>\n<li>\u56fe\u50cf\u5927\u5c0f\u4e0d\u5b9c\u8fc7\u5927&#xff0c;\u53ef\u4ee5\u5148\u7f29\u5c0f\u5904\u7406<\/li>\n<\/ul>\n<p>\u4e24\u79cd\u65b9\u6cd5\u90fd\u9700\u8981\u5b89\u88c5OpenCV&#xff1a;<\/p>\n<p>pip install opencv-python opencv-contrib-python<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb290\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u56fe\u7247\u62fc\u63a5\uff08image stitching\uff09\u5c31\u662f\u5c06\u7edf\u4e00\u573a\u666f\u7684\u4e0d\u540c\u62cd\u6444\u51fa\u7684\u56fe\u7247\u62fc\u63a5\u5230\u4e00\u8d77\uff0c\u5982\u56fe\u6240\u793a\u5c31\u662f\u62fc\u63a5\u5168\u666f\u56fe\uff0c\u662f\u56fe\u7247\u62fc\u63a5\u7684\u5e94\u7528\u4e4b\u4e00\uff0c\u624b\u673a\u62cd\u7167\u90fd\u6709\u5168\u666f\u62cd\u6444\u529f\u80fd\u4ed4\u7ec6\u89c2\u5bdf\u5168\u666f\u56fe\uff0c\u5bfb\u627e\u5b83\u4eec\u76f8\u4f3c\u6027\uff0c\u56fe8-2\u7684\u5168\u666f\u56fe\u53ef\u4ee5\u901a\u8fc7\u7f29\u653e\uff0c\u65cb\u8f6c\uff0c\u5c04\u5f71\u7b49\u64cd\u4f5c\u8fdb\u884c\u62fc\u63a5\u800c\u6210\uff0c\u6211\u4eec\u9996\u5148\u4ecb\u7ecd\u51e0\u4e2a\u5e38\u7528\u7684\u56fe\u50cf\u53d8\u6362RANSAC\uff08Random Sample Consensus\uff09\u662f\u4e00\u79cd\u9c81\u68d2\u7684\u6a21\u578b\u62df\u5408\u7b97\u6cd5\uff0c\u5e38\u7528\u4e8e\u5904\u7406\u5305\u542b\u5927\u91cf\u566a\u58f0\u6216\u5f02\u5e38\u503c\u7684\u6570\u636e\u3002<\/p>\n","protected":false},"author":2,"featured_media":54198,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50,523],"topic":[],"class_list":["post-54200","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-50","tag-523"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/54200.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb290\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u56fe\u7247\u62fc\u63a5\uff08image stitching\uff09\u5c31\u662f\u5c06\u7edf\u4e00\u573a\u666f\u7684\u4e0d\u540c\u62cd\u6444\u51fa\u7684\u56fe\u7247\u62fc\u63a5\u5230\u4e00\u8d77\uff0c\u5982\u56fe\u6240\u793a\u5c31\u662f\u62fc\u63a5\u5168\u666f\u56fe\uff0c\u662f\u56fe\u7247\u62fc\u63a5\u7684\u5e94\u7528\u4e4b\u4e00\uff0c\u624b\u673a\u62cd\u7167\u90fd\u6709\u5168\u666f\u62cd\u6444\u529f\u80fd\u4ed4\u7ec6\u89c2\u5bdf\u5168\u666f\u56fe\uff0c\u5bfb\u627e\u5b83\u4eec\u76f8\u4f3c\u6027\uff0c\u56fe8-2\u7684\u5168\u666f\u56fe\u53ef\u4ee5\u901a\u8fc7\u7f29\u653e\uff0c\u65cb\u8f6c\uff0c\u5c04\u5f71\u7b49\u64cd\u4f5c\u8fdb\u884c\u62fc\u63a5\u800c\u6210\uff0c\u6211\u4eec\u9996\u5148\u4ecb\u7ecd\u51e0\u4e2a\u5e38\u7528\u7684\u56fe\u50cf\u53d8\u6362RANSAC\uff08Random Sample Consensus\uff09\u662f\u4e00\u79cd\u9c81\u68d2\u7684\u6a21\u578b\u62df\u5408\u7b97\u6cd5\uff0c\u5e38\u7528\u4e8e\u5904\u7406\u5305\u542b\u5927\u91cf\u566a\u58f0\u6216\u5f02\u5e38\u503c\u7684\u6570\u636e\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/54200.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-12T15:49:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812154937-689b629184276.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/54200.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/54200.html\",\"name\":\"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-12T15:49:43+00:00\",\"dateModified\":\"2025-08-12T15:49:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/54200.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/54200.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/54200.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/54200.html","og_locale":"zh_CN","og_type":"article","og_title":"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb290\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u56fe\u7247\u62fc\u63a5\uff08image stitching\uff09\u5c31\u662f\u5c06\u7edf\u4e00\u573a\u666f\u7684\u4e0d\u540c\u62cd\u6444\u51fa\u7684\u56fe\u7247\u62fc\u63a5\u5230\u4e00\u8d77\uff0c\u5982\u56fe\u6240\u793a\u5c31\u662f\u62fc\u63a5\u5168\u666f\u56fe\uff0c\u662f\u56fe\u7247\u62fc\u63a5\u7684\u5e94\u7528\u4e4b\u4e00\uff0c\u624b\u673a\u62cd\u7167\u90fd\u6709\u5168\u666f\u62cd\u6444\u529f\u80fd\u4ed4\u7ec6\u89c2\u5bdf\u5168\u666f\u56fe\uff0c\u5bfb\u627e\u5b83\u4eec\u76f8\u4f3c\u6027\uff0c\u56fe8-2\u7684\u5168\u666f\u56fe\u53ef\u4ee5\u901a\u8fc7\u7f29\u653e\uff0c\u65cb\u8f6c\uff0c\u5c04\u5f71\u7b49\u64cd\u4f5c\u8fdb\u884c\u62fc\u63a5\u800c\u6210\uff0c\u6211\u4eec\u9996\u5148\u4ecb\u7ecd\u51e0\u4e2a\u5e38\u7528\u7684\u56fe\u50cf\u53d8\u6362RANSAC\uff08Random Sample Consensus\uff09\u662f\u4e00\u79cd\u9c81\u68d2\u7684\u6a21\u578b\u62df\u5408\u7b97\u6cd5\uff0c\u5e38\u7528\u4e8e\u5904\u7406\u5305\u542b\u5927\u91cf\u566a\u58f0\u6216\u5f02\u5e38\u503c\u7684\u6570\u636e\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/54200.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-12T15:49:43+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812154937-689b629184276.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/54200.html","url":"https:\/\/www.wsisp.com\/helps\/54200.html","name":"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-12T15:49:43+00:00","dateModified":"2025-08-12T15:49:43+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/54200.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/54200.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/54200.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u56fe\u7247\u62fc\u63a5-\u52a8\u624b\u5b66\u8ba1\u7b97\u673a\u89c6\u89c98"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/54200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=54200"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/54200\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/54198"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=54200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=54200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=54200"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=54200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}