{"id":1086639,"date":"2025-01-08T13:27:34","date_gmt":"2025-01-08T05:27:34","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1086639.html"},"modified":"2025-01-08T13:27:36","modified_gmt":"2025-01-08T05:27:36","slug":"python%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e4%b8%a4%e4%b8%aa%e5%9b%be%e5%83%8f%e7%9b%b8%e4%bc%bc-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1086639.html","title":{"rendered":"python\u5982\u4f55\u5224\u65ad\u4e24\u4e2a\u56fe\u50cf\u76f8\u4f3c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24195941\/b511aee2-f3c6-418d-9ad1-972d836e595e.webp\" alt=\"python\u5982\u4f55\u5224\u65ad\u4e24\u4e2a\u56fe\u50cf\u76f8\u4f3c\" \/><\/p>\n<p><p> <strong>Python\u5224\u65ad\u4e24\u4e2a\u56fe\u50cf\u76f8\u4f3c\u7684\u65b9\u6cd5\u6709\uff1a\u76f4\u65b9\u56fe\u6bd4\u8f83\u3001\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\u3001\u7279\u5f81\u70b9\u5339\u914d\u3001\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\uff08SSIM\uff09\u6765\u8be6\u7ec6\u63cf\u8ff0\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\uff08SSIM\uff09<\/strong>\u662f\u4e00\u79cd\u8861\u91cf\u4e24\u5e45\u56fe\u50cf\u76f8\u4f3c\u5ea6\u7684\u6307\u6807\u3002SSIM\u8003\u8651\u4e86\u4eae\u5ea6\u3001\u5bf9\u6bd4\u5ea6\u548c\u7ed3\u6784\u4fe1\u606f\uff0c\u662f\u4e00\u79cd\u66f4\u7b26\u5408\u4eba\u773c\u89c6\u89c9\u611f\u77e5\u7684\u76f8\u4f3c\u5ea6\u8bc4\u4f30\u65b9\u6cd5\u3002\u901a\u8fc7\u8ba1\u7b97SSIM\u503c\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u4e24\u4e2a\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u5206\u6570\uff0c\u5206\u6570\u8d8a\u9ad8\u8868\u793a\u56fe\u50cf\u8d8a\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><p>\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u56fe\u50cf\u76f8\u4f3c\u5ea6\u5224\u65ad\uff1a<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u76f4\u65b9\u56fe\u6bd4\u8f83<\/p>\n<\/p>\n<p><p>\u76f4\u65b9\u56fe\u6bd4\u8f83\u662f\u4e00\u79cd\u7ecf\u5178\u7684\u56fe\u50cf\u76f8\u4f3c\u5ea6\u8bc4\u4f30\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u8ba1\u7b97\u56fe\u50cf\u7684\u989c\u8272\u76f4\u65b9\u56fe\uff0c\u5e76\u6bd4\u8f83\u76f4\u65b9\u56fe\u4e4b\u95f4\u7684\u5dee\u5f02\u6765\u5224\u65ad\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u3002\u5e38\u89c1\u7684\u76f4\u65b9\u56fe\u6bd4\u8f83\u65b9\u6cd5\u6709\u5df4\u6c0f\u8ddd\u79bb\u3001\u76f8\u5173\u6027\u6bd4\u8f83\u548c\u5361\u65b9\u6bd4\u8f83\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528OpenCV\u5e93\u6765\u8ba1\u7b97\u548c\u6bd4\u8f83\u56fe\u50cf\u76f4\u65b9\u56fe\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<p>import numpy as np<\/p>\n<p>def calculate_histogram(image):<\/p>\n<p>    # \u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf<\/p>\n<p>    gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)<\/p>\n<p>    # \u8ba1\u7b97\u56fe\u50cf\u7684\u76f4\u65b9\u56fe<\/p>\n<p>    histogram = cv2.calcHist([gray_image], [0], None, [256], [0, 256])<\/p>\n<p>    return histogram<\/p>\n<p>def compare_histograms(hist1, hist2):<\/p>\n<p>    # \u4f7f\u7528\u5df4\u6c0f\u8ddd\u79bb\u6bd4\u8f83\u76f4\u65b9\u56fe<\/p>\n<p>    score = cv2.compareHist(hist1, hist2, cv2.HISTCMP_BHATTACHARYYA)<\/p>\n<p>    return score<\/p>\n<h2><strong>\u8bfb\u53d6\u4e24\u5e45\u56fe\u50cf<\/strong><\/h2>\n<p>image1 = cv2.imread(&#39;image1.jpg&#39;)<\/p>\n<p>image2 = cv2.imread(&#39;image2.jpg&#39;)<\/p>\n<h2><strong>\u8ba1\u7b97\u4e24\u5e45\u56fe\u50cf\u7684\u76f4\u65b9\u56fe<\/strong><\/h2>\n<p>hist1 = calculate_histogram(image1)<\/p>\n<p>hist2 = calculate_histogram(image2)<\/p>\n<h2><strong>\u6bd4\u8f83\u4e24\u5e45\u56fe\u50cf\u7684\u76f4\u65b9\u56fe<\/strong><\/h2>\n<p>score = compare_histograms(hist1, hist2)<\/p>\n<p>print(&quot;Histogram comparison score:&quot;, score)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf\uff0c\u7136\u540e\u8ba1\u7b97\u5176\u76f4\u65b9\u56fe\u3002\u63a5\u7740\uff0c\u6211\u4eec\u4f7f\u7528\u5df4\u6c0f\u8ddd\u79bb\u6765\u6bd4\u8f83\u4e24\u5e45\u56fe\u50cf\u7684\u76f4\u65b9\u56fe\uff0c\u5e76\u8f93\u51fa\u6bd4\u8f83\u5f97\u5206\u3002\u5f97\u5206\u8d8a\u4f4e\u8868\u793a\u56fe\u50cf\u8d8a\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\uff08SSIM\uff09<\/p>\n<\/p>\n<p><p>\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\uff08SSIM\uff09\u662f\u4e00\u79cd\u66f4\u7b26\u5408\u4eba\u773c\u89c6\u89c9\u611f\u77e5\u7684\u76f8\u4f3c\u5ea6\u8bc4\u4f30\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u8003\u8651\u56fe\u50cf\u7684\u4eae\u5ea6\u3001\u5bf9\u6bd4\u5ea6\u548c\u7ed3\u6784\u4fe1\u606f\u6765\u8861\u91cf\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528scikit-image\u5e93\u4e2d\u7684ssim\u51fd\u6570\u6765\u8ba1\u7b97\u56fe\u50cf\u7684SSIM\u503c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from skimage.metrics import structural_similarity as ssim<\/p>\n<p>import cv2<\/p>\n<p>def calculate_ssim(image1, image2):<\/p>\n<p>    # \u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf<\/p>\n<p>    gray_image1 = cv2.cvtColor(image1, cv2.COLOR_BGR2GRAY)<\/p>\n<p>    gray_image2 = cv2.cvtColor(image2, cv2.COLOR_BGR2GRAY)<\/p>\n<p>    # \u8ba1\u7b97\u56fe\u50cf\u7684SSIM\u503c<\/p>\n<p>    score, _ = ssim(gray_image1, gray_image2, full=True)<\/p>\n<p>    return score<\/p>\n<h2><strong>\u8bfb\u53d6\u4e24\u5e45\u56fe\u50cf<\/strong><\/h2>\n<p>image1 = cv2.imread(&#39;image1.jpg&#39;)<\/p>\n<p>image2 = cv2.imread(&#39;image2.jpg&#39;)<\/p>\n<h2><strong>\u8ba1\u7b97\u4e24\u5e45\u56fe\u50cf\u7684SSIM\u503c<\/strong><\/h2>\n<p>score = calculate_ssim(image1, image2)<\/p>\n<p>print(&quot;SSIM score:&quot;, score)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf\uff0c\u7136\u540e\u4f7f\u7528ssim\u51fd\u6570\u8ba1\u7b97\u56fe\u50cf\u7684SSIM\u503c\uff0c\u5e76\u8f93\u51fa\u76f8\u4f3c\u5ea6\u5206\u6570\u3002\u5206\u6570\u8d8a\u9ad8\u8868\u793a\u56fe\u50cf\u8d8a\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u7279\u5f81\u70b9\u5339\u914d<\/p>\n<\/p>\n<p><p>\u7279\u5f81\u70b9\u5339\u914d\u662f\u4e00\u79cd\u57fa\u4e8e\u56fe\u50cf\u7279\u5f81\u70b9\u8fdb\u884c\u76f8\u4f3c\u5ea6\u8bc4\u4f30\u7684\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u68c0\u6d4b\u56fe\u50cf\u4e2d\u7684\u7279\u5f81\u70b9\uff0c\u5e76\u6bd4\u8f83\u7279\u5f81\u70b9\u4e4b\u95f4\u7684\u5339\u914d\u7a0b\u5ea6\u6765\u5224\u65ad\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u3002\u5e38\u89c1\u7684\u7279\u5f81\u70b9\u68c0\u6d4b\u7b97\u6cd5\u6709SIFT\u3001SURF\u548cORB\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528OpenCV\u5e93\u4e2d\u7684ORB\u7b97\u6cd5\u8fdb\u884c\u7279\u5f81\u70b9\u5339\u914d\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<p>def match_features(image1, image2):<\/p>\n<p>    # \u521b\u5efaORB\u7279\u5f81\u68c0\u6d4b\u5668<\/p>\n<p>    orb = cv2.ORB_create()<\/p>\n<p>    # \u68c0\u6d4b\u56fe\u50cf\u7684\u7279\u5f81\u70b9\u548c\u63cf\u8ff0\u7b26<\/p>\n<p>    keypoints1, descriptors1 = orb.detectAndCompute(image1, None)<\/p>\n<p>    keypoints2, descriptors2 = orb.detectAndCompute(image2, None)<\/p>\n<p>    # \u521b\u5efaBFMatcher\u8fdb\u884c\u7279\u5f81\u70b9\u5339\u914d<\/p>\n<p>    bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)<\/p>\n<p>    matches = bf.match(descriptors1, descriptors2)<\/p>\n<p>    # \u6839\u636e\u7279\u5f81\u70b9\u5339\u914d\u7684\u8ddd\u79bb\u8fdb\u884c\u6392\u5e8f<\/p>\n<p>    matches = sorted(matches, key=lambda x: x.distance)<\/p>\n<p>    return matches<\/p>\n<h2><strong>\u8bfb\u53d6\u4e24\u5e45\u56fe\u50cf<\/strong><\/h2>\n<p>image1 = cv2.imread(&#39;image1.jpg&#39;)<\/p>\n<p>image2 = cv2.imread(&#39;image2.jpg&#39;)<\/p>\n<h2><strong>\u8fdb\u884c\u7279\u5f81\u70b9\u5339\u914d<\/strong><\/h2>\n<p>matches = match_features(image1, image2)<\/p>\n<p>print(&quot;Number of matched features:&quot;, len(matches))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528ORB\u7b97\u6cd5\u68c0\u6d4b\u56fe\u50cf\u7684\u7279\u5f81\u70b9\u548c\u63cf\u8ff0\u7b26\uff0c\u7136\u540e\u4f7f\u7528BFMatcher\u8fdb\u884c\u7279\u5f81\u70b9\u5339\u914d\uff0c\u5e76\u8f93\u51fa\u5339\u914d\u7684\u7279\u5f81\u70b9\u6570\u91cf\u3002\u5339\u914d\u7684\u7279\u5f81\u70b9\u6570\u91cf\u8d8a\u591a\u8868\u793a\u56fe\u50cf\u8d8a\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5<\/p>\n<\/p>\n<p><p>\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5\u662f\u4e00\u79cd\u57fa\u4e8e\u56fe\u50cf\u611f\u77e5\u7279\u6027\u7684\u76f8\u4f3c\u5ea6\u8bc4\u4f30\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u5bf9\u56fe\u50cf\u8fdb\u884c\u54c8\u5e0c\u7f16\u7801\uff0c\u5e76\u6bd4\u8f83\u54c8\u5e0c\u503c\u7684\u5dee\u5f02\u6765\u5224\u65ad\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u3002\u5e38\u89c1\u7684\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5\u6709\u5dee\u5f02\u54c8\u5e0c\u3001\u5e73\u5747\u54c8\u5e0c\u548c\u611f\u77e5\u54c8\u5e0c\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528imagehash\u5e93\u4e2d\u7684\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5\u6765\u8ba1\u7b97\u56fe\u50cf\u7684\u54c8\u5e0c\u503c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image<\/p>\n<p>import imagehash<\/p>\n<p>def calculate_hash(image_path):<\/p>\n<p>    # \u8bfb\u53d6\u56fe\u50cf<\/p>\n<p>    image = Image.open(image_path)<\/p>\n<p>    # \u8ba1\u7b97\u56fe\u50cf\u7684\u611f\u77e5\u54c8\u5e0c\u503c<\/p>\n<p>    hash_value = imagehash.phash(image)<\/p>\n<p>    return hash_value<\/p>\n<h2><strong>\u8ba1\u7b97\u4e24\u5e45\u56fe\u50cf\u7684\u611f\u77e5\u54c8\u5e0c\u503c<\/strong><\/h2>\n<p>hash1 = calculate_hash(&#39;image1.jpg&#39;)<\/p>\n<p>hash2 = calculate_hash(&#39;image2.jpg&#39;)<\/p>\n<h2><strong>\u8ba1\u7b97\u54c8\u5e0c\u503c\u4e4b\u95f4\u7684\u6c49\u660e\u8ddd\u79bb<\/strong><\/h2>\n<p>hamming_distance = hash1 - hash2<\/p>\n<p>print(&quot;Hamming distance:&quot;, hamming_distance)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528imagehash\u5e93\u8ba1\u7b97\u56fe\u50cf\u7684\u611f\u77e5\u54c8\u5e0c\u503c\uff0c\u7136\u540e\u8ba1\u7b97\u54c8\u5e0c\u503c\u4e4b\u95f4\u7684\u6c49\u660e\u8ddd\u79bb\uff0c\u5e76\u8f93\u51fa\u76f8\u4f3c\u5ea6\u5206\u6570\u3002\u6c49\u660e\u8ddd\u79bb\u8d8a\u5c0f\u8868\u793a\u56fe\u50cf\u8d8a\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0c\u4f7f\u7528Python\u5224\u65ad\u4e24\u4e2a\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u76f4\u65b9\u56fe\u6bd4\u8f83\u3001\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\u3001\u7279\u5f81\u70b9\u5339\u914d\u548c\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5\u7b49\u3002\u5176\u4e2d\uff0c\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\uff08SSIM\uff09\u662f\u4e00\u79cd\u66f4\u7b26\u5408\u4eba\u773c\u89c6\u89c9\u611f\u77e5\u7684\u76f8\u4f3c\u5ea6\u8bc4\u4f30\u65b9\u6cd5\uff0c\u9002\u7528\u4e8e\u5927\u90e8\u5206\u573a\u666f\u3002\u901a\u8fc7\u5408\u7406\u9009\u62e9\u548c\u7ec4\u5408\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u51c6\u786e\u5730\u5224\u65ad\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u6bd4\u8f83\u4e24\u5e45\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5e93\u6765\u6bd4\u8f83\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528OpenCV\u5e93\u7684\u7ed3\u6784\u76f8\u4f3c\u6027\u6307\u6570\uff08SSIM\uff09\u6216\u5747\u65b9\u8bef\u5dee\uff08MSE\uff09\u6765\u91cf\u5316\u56fe\u50cf\u4e4b\u95f4\u7684\u5dee\u5f02\u3002\u6b64\u5916\uff0cPIL\u5e93\u4e5f\u53ef\u4ee5\u7528\u6765\u52a0\u8f7d\u548c\u5904\u7406\u56fe\u50cf\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u56fe\u50cf\u76f8\u4f3c\u5ea6\u7684\u7cbe\u786e\u6d4b\u91cf\u3002<\/p>\n<p><strong>\u54ea\u4e9b\u5e93\u9002\u5408\u7528\u4e8e\u56fe\u50cf\u76f8\u4f3c\u5ea6\u7684\u8ba1\u7b97\uff1f<\/strong><br \/>\u5e38\u7528\u7684\u5e93\u5305\u62ecOpenCV\u3001PIL\uff08Pillow\uff09\u3001scikit-image\u548cNumPy\u3002OpenCV\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u56fe\u50cf\u5904\u7406\u529f\u80fd\uff0c\u9002\u5408\u4e8e\u9ad8\u6548\u7684\u56fe\u50cf\u6bd4\u8f83\u3002PIL\u5219\u66f4\u6613\u4e8e\u4f7f\u7528\uff0c\u9002\u5408\u4e8e\u56fe\u50cf\u7684\u57fa\u672c\u64cd\u4f5c\u3002scikit-image\u63d0\u4f9b\u4e86\u4e00\u4e9b\u9ad8\u7ea7\u56fe\u50cf\u5904\u7406\u529f\u80fd\uff0c\u800cNumPy\u5219\u7528\u4e8e\u5904\u7406\u56fe\u50cf\u6570\u636e\u6570\u7ec4\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u56fe\u50cf\u7684\u5927\u5c0f\u548c\u989c\u8272\u5dee\u5f02\uff1f<\/strong><br \/>\u5728\u6bd4\u8f83\u56fe\u50cf\u65f6\uff0c\u786e\u4fdd\u4e24\u5e45\u56fe\u50cf\u7684\u5927\u5c0f\u4e00\u81f4\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u4f7f\u7528\u56fe\u50cf\u5904\u7406\u5e93\u4e2d\u7684resize\u529f\u80fd\u6765\u8c03\u6574\u56fe\u50cf\u5c3a\u5bf8\u3002\u540c\u65f6\uff0c\u5bf9\u4e8e\u989c\u8272\u5dee\u5f02\uff0c\u53ef\u4ee5\u8003\u8651\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\uff0c\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u989c\u8272\u5dee\u5f02\u5bf9\u76f8\u4f3c\u5ea6\u8ba1\u7b97\u7684\u5f71\u54cd\u3002\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528\u7279\u5f81\u63d0\u53d6\u6280\u672f\uff0c\u5982SIFT\u6216ORB\uff0c\u6765\u63d0\u53d6\u91cd\u8981\u7279\u5f81\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5224\u65ad\u4e24\u4e2a\u56fe\u50cf\u76f8\u4f3c\u7684\u65b9\u6cd5\u6709\uff1a\u76f4\u65b9\u56fe\u6bd4\u8f83\u3001\u7ed3\u6784\u76f8\u4f3c\u6027\u6bd4\u8f83\u3001\u7279\u5f81\u70b9\u5339\u914d\u3001\u611f\u77e5\u54c8\u5e0c\u7b97\u6cd5\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7ed3\u6784\u76f8 [&hellip;]","protected":false},"author":3,"featured_media":1086646,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1086639"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1086639"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1086639\/revisions"}],"predecessor-version":[{"id":1086648,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1086639\/revisions\/1086648"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1086646"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1086639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1086639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1086639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}