{"id":1056745,"date":"2024-12-31T15:02:10","date_gmt":"2024-12-31T07:02:10","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1056745.html"},"modified":"2024-12-31T15:02:12","modified_gmt":"2024-12-31T07:02:12","slug":"python%e5%a6%82%e4%bd%95%e6%a0%b9%e6%8d%ae%e4%b8%80%e5%bc%a0%e5%9b%be%e7%89%87%e5%ae%9a%e4%bd%8d","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1056745.html","title":{"rendered":"python\u5982\u4f55\u6839\u636e\u4e00\u5f20\u56fe\u7247\u5b9a\u4f4d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/f60ad8f1-a394-4b5a-9693-90f01e27e63b.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u6839\u636e\u4e00\u5f20\u56fe\u7247\u5b9a\u4f4d\" \/><\/p>\n<p><p> Python\u5982\u4f55\u6839\u636e\u4e00\u5f20\u56fe\u7247\u5b9a\u4f4d\uff0c<strong>\u901a\u8fc7\u56fe\u50cf\u5904\u7406\u6280\u672f\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b\u3001\u4f7f\u7528\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\uff08\u5982OpenCV\uff09\u3001\u5229\u7528\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff08\u5982YOLO\u3001Faster R-CNN\uff09<\/strong>\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u5b9e\u73b0\u56fe\u7247\u5b9a\u4f4d\uff0c\u91cd\u70b9\u8bb2\u8ff0\u5982\u4f55\u4f7f\u7528OpenCV\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7\u56fe\u50cf\u5904\u7406\u6280\u672f\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b<\/p>\n<\/p>\n<p><p>\u56fe\u50cf\u5904\u7406\u6280\u672f\u662f\u6700\u57fa\u672c\u4e14\u5e38\u7528\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u5b83\u901a\u8fc7\u68c0\u6d4b\u56fe\u50cf\u4e2d\u7684\u7279\u5b9a\u7279\u5f81\uff08\u5982\u8fb9\u7f18\u3001\u989c\u8272\u3001\u5f62\u72b6\u7b49\uff09\u6765\u5b9a\u4f4d\u5bf9\u8c61\u3002Python\u4e2d\u6709\u591a\u4e2a\u5e93\u652f\u6301\u56fe\u50cf\u5904\u7406\uff0c\u5176\u4e2dOpenCV\u662f\u6700\u6d41\u884c\u7684\u4e00\u4e2a\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165OpenCV\u5e93<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5OpenCV\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install opencv-python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u5728\u4ee3\u7801\u4e2d\u5bfc\u5165OpenCV\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u8bfb\u53d6\u548c\u663e\u793a\u56fe\u50cf<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528OpenCV\u8bfb\u53d6\u56fe\u50cf\u5e76\u663e\u793a\u56fe\u50cf\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">image = cv2.imread(&#39;image.jpg&#39;)<\/p>\n<p>cv2.imshow(&#39;Image&#39;, image)<\/p>\n<p>cv2.w<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>tKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u56fe\u50cf\u9884\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u5bf9\u8c61\u68c0\u6d4b\u7684\u51c6\u786e\u6027\uff0c\u901a\u5e38\u9700\u8981\u5bf9\u56fe\u50cf\u8fdb\u884c\u9884\u5904\u7406\u3002\u5e38\u7528\u7684\u9884\u5904\u7406\u65b9\u6cd5\u5305\u62ec\u7070\u5ea6\u5316\u3001\u6a21\u7cca\u5316\u3001\u8fb9\u7f18\u68c0\u6d4b\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u7070\u5ea6\u5316<\/p>\n<p>gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)<\/p>\n<h2><strong>\u9ad8\u65af\u6a21\u7cca<\/strong><\/h2>\n<p>blurred_image = cv2.GaussianBlur(gray_image, (5, 5), 0)<\/p>\n<h2><strong>\u8fb9\u7f18\u68c0\u6d4b<\/strong><\/h2>\n<p>edges = cv2.Canny(blurred_image, 50, 150)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4\u3001\u8f6e\u5ed3\u68c0\u6d4b<\/h3>\n<\/p>\n<p><p>\u8f6e\u5ed3\u68c0\u6d4b\u662f\u5bf9\u8c61\u68c0\u6d4b\u7684\u4e00\u4e2a\u91cd\u8981\u6b65\u9aa4\u3002OpenCV\u63d0\u4f9b\u4e86findContours\u51fd\u6570\u6765\u68c0\u6d4b\u56fe\u50cf\u4e2d\u7684\u8f6e\u5ed3\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>5\u3001\u7ed8\u5236\u8f6e\u5ed3<\/h3>\n<\/p>\n<p><p>\u68c0\u6d4b\u5230\u8f6e\u5ed3\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528drawContours\u51fd\u6570\u5c06\u8f6e\u5ed3\u7ed8\u5236\u5728\u56fe\u50cf\u4e0a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cv2.drawContours(image, contours, -1, (0, 255, 0), 3)<\/p>\n<p>cv2.imshow(&#39;Contours&#39;, image)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\uff08\u5982OpenCV\uff09<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u57fa\u672c\u7684\u56fe\u50cf\u5904\u7406\u6280\u672f\uff0cOpenCV\u8fd8\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u5bf9\u8c61\u68c0\u6d4b\u7b97\u6cd5\uff0c\u5982\u6a21\u677f\u5339\u914d\u3001Haar\u7ea7\u8054\u5206\u7c7b\u5668\u7b49\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u6a21\u677f\u5339\u914d<\/h3>\n<\/p>\n<p><p>\u6a21\u677f\u5339\u914d\u662f\u4e00\u79cd\u7b80\u5355\u800c\u6709\u6548\u7684\u5bf9\u8c61\u68c0\u6d4b\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u5339\u914d\u56fe\u50cf\u4e2d\u7684\u6a21\u677f\u6765\u5b9a\u4f4d\u5bf9\u8c61\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">template = cv2.imread(&#39;template.jpg&#39;, 0)<\/p>\n<p>w, h = template.shape[::-1]<\/p>\n<p>res = cv2.matchTemplate(gray_image, template, cv2.TM_CCOEFF_NORMED)<\/p>\n<p>threshold = 0.8<\/p>\n<p>loc = np.where(res &gt;= threshold)<\/p>\n<p>for pt in zip(*loc[::-1]):<\/p>\n<p>    cv2.rectangle(image, pt, (pt[0] + w, pt[1] + h), (0, 255, 0), 2)<\/p>\n<p>cv2.imshow(&#39;Detected&#39;, image)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001Haar\u7ea7\u8054\u5206\u7c7b\u5668<\/h3>\n<\/p>\n<p><p>Haar\u7ea7\u8054\u5206\u7c7b\u5668\u662f\u4e00\u79cd\u57fa\u4e8e<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7684\u5bf9\u8c61\u68c0\u6d4b\u65b9\u6cd5\uff0c\u5e38\u7528\u4e8e\u4eba\u8138\u68c0\u6d4b\u3002OpenCV\u63d0\u4f9b\u4e86\u9884\u8bad\u7ec3\u7684Haar\u7ea7\u8054\u5206\u7c7b\u5668\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + &#39;haarcascade_frontalface_default.xml&#39;)<\/p>\n<p>faces = face_cascade.detectMultiScale(gray_image, 1.1, 4)<\/p>\n<p>for (x, y, w, h) in faces:<\/p>\n<p>    cv2.rectangle(image, (x, y), (x + w, y + h), (255, 0, 0), 2)<\/p>\n<p>cv2.imshow(&#39;Face Detected&#39;, image)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u5229\u7528\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff08\u5982YOLO\u3001Faster R-CNN\uff09<\/p>\n<\/p>\n<p><p>\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u662f\u5f53\u524d\u6700\u5148\u8fdb\u7684\u5bf9\u8c61\u68c0\u6d4b\u65b9\u6cd5\u3002YOLO\uff08You Only Look Once\uff09\u548cFaster R-CNN\u662f\u5176\u4e2d\u6700\u8457\u540d\u7684\u4e24\u4e2a\u6a21\u578b\u3002<\/p>\n<\/p>\n<p><h3>1\u3001YOLO\u5bf9\u8c61\u68c0\u6d4b<\/h3>\n<\/p>\n<p><p>YOLO\u662f\u4e00\u79cd\u5b9e\u65f6\u5bf9\u8c61\u68c0\u6d4b\u7b97\u6cd5\uff0c\u80fd\u591f\u5728\u5355\u6b21\u524d\u5411\u4f20\u64ad\u4e2d\u68c0\u6d4b\u591a\u4e2a\u5bf9\u8c61\u3002Python\u4e2d\u53ef\u4ee5\u4f7f\u7528Darknet\u5e93\u6765\u5b9e\u73b0YOLO\u5bf9\u8c61\u68c0\u6d4b\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u4e0b\u8f7dYOLO\u7684\u9884\u8bad\u7ec3\u6a21\u578b\u548c\u914d\u7f6e\u6587\u4ef6\u3002\u7136\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<p>import numpy as np<\/p>\n<p>net = cv2.dnn.readNet(&#39;yolov3.weights&#39;, &#39;yolov3.cfg&#39;)<\/p>\n<p>layer_names = net.getLayerNames()<\/p>\n<p>output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]<\/p>\n<p>image = cv2.imread(&#39;image.jpg&#39;)<\/p>\n<p>height, width, channels = image.shape<\/p>\n<p>blob = cv2.dnn.blobFromImage(image, 0.00392, (416, 416), (0, 0, 0), True, crop=False)<\/p>\n<p>net.setInput(blob)<\/p>\n<p>outs = net.forward(output_layers)<\/p>\n<p>class_ids = []<\/p>\n<p>confidences = []<\/p>\n<p>boxes = []<\/p>\n<p>for out in outs:<\/p>\n<p>    for detection in out:<\/p>\n<p>        scores = detection[5:]<\/p>\n<p>        class_id = np.argmax(scores)<\/p>\n<p>        confidence = scores[class_id]<\/p>\n<p>        if confidence &gt; 0.5:<\/p>\n<p>            center_x = int(detection[0] * width)<\/p>\n<p>            center_y = int(detection[1] * height)<\/p>\n<p>            w = int(detection[2] * width)<\/p>\n<p>            h = int(detection[3] * height)<\/p>\n<p>            x = int(center_x - w \/ 2)<\/p>\n<p>            y = int(center_y - h \/ 2)<\/p>\n<p>            boxes.append([x, y, w, h])<\/p>\n<p>            confidences.append(float(confidence))<\/p>\n<p>            class_ids.append(class_id)<\/p>\n<p>indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)<\/p>\n<p>for i in range(len(boxes)):<\/p>\n<p>    if i in indexes:<\/p>\n<p>        x, y, w, h = boxes[i]<\/p>\n<p>        cv2.rectangle(image, (x, y), (x + w, y + h), (0, 255, 0), 2)<\/p>\n<p>cv2.imshow(&#39;YOLO Detected&#39;, image)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001Faster R-CNN\u5bf9\u8c61\u68c0\u6d4b<\/h3>\n<\/p>\n<p><p>Faster R-CNN\u662f\u4e00\u79cd\u57fa\u4e8e\u533a\u57df\u5efa\u8bae\u7f51\u7edc\uff08RPN\uff09\u7684\u5bf9\u8c61\u68c0\u6d4b\u65b9\u6cd5\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528TensorFlow\u6216PyTorch\u5b9e\u73b0Faster R-CNN\u5bf9\u8c61\u68c0\u6d4b\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528TensorFlow\u5b9e\u73b0Faster R-CNN\u5bf9\u8c61\u68c0\u6d4b\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tensorflow as tf<\/p>\n<p>import numpy as np<\/p>\n<p>import cv2<\/p>\n<p>model = tf.saved_model.load(&#39;faster_rcnn_model\/saved_model&#39;)<\/p>\n<p>image = cv2.imread(&#39;image.jpg&#39;)<\/p>\n<p>input_tensor = tf.convert_to_tensor(np.expand_dims(image, 0), dtype=tf.uint8)<\/p>\n<p>detections = model(input_tensor)<\/p>\n<p>for i in range(detections[&#39;detection_boxes&#39;].shape[0]):<\/p>\n<p>    box = detections[&#39;detection_boxes&#39;][i].numpy()<\/p>\n<p>    score = detections[&#39;detection_scores&#39;][i].numpy()<\/p>\n<p>    if score &gt; 0.5:<\/p>\n<p>        ymin, xmin, ymax, xmax = box<\/p>\n<p>        (left, right, top, bottom) = (xmin * width, xmax * width, ymin * height, ymax * height)<\/p>\n<p>        cv2.rectangle(image, (int(left), int(top)), (int(right), int(bottom)), (0, 255, 0), 2)<\/p>\n<p>cv2.imshow(&#39;Faster R-CNN Detected&#39;, image)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86<strong>\u901a\u8fc7\u56fe\u50cf\u5904\u7406\u6280\u672f\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b\u3001\u4f7f\u7528\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\uff08\u5982OpenCV\uff09\u3001\u5229\u7528\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff08\u5982YOLO\u3001Faster R-CNN\uff09<\/strong>\u6765\u5b9e\u73b0Python\u6839\u636e\u4e00\u5f20\u56fe\u7247\u5b9a\u4f4d\u5bf9\u8c61\u7684\u65b9\u6cd5\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u7f3a\u70b9\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u5e94\u7528\u573a\u666f\u548c\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u56fe\u50cf\u5904\u7406\u6280\u672f\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b\u9002\u7528\u4e8e\u7b80\u5355\u573a\u666f\uff0c\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\uff08\u5982OpenCV\uff09\u63d0\u4f9b\u4e86\u66f4\u591a\u9ad8\u7ea7\u7b97\u6cd5\uff0c\u9002\u7528\u4e8e\u590d\u6742\u573a\u666f\u3002\u5229\u7528\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff08\u5982YOLO\u3001Faster R-CNN\uff09\u53ef\u4ee5\u5b9e\u73b0\u9ad8\u7cbe\u5ea6\u7684\u5b9e\u65f6\u5bf9\u8c61\u68c0\u6d4b\uff0c\u9002\u7528\u4e8e\u5927\u89c4\u6a21\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u672c\u6587\u80fd\u4e3a\u4f60\u5728Python\u4e2d\u5b9e\u73b0\u56fe\u7247\u5b9a\u4f4d\u63d0\u4f9b\u6709\u4ef7\u503c\u7684\u53c2\u8003\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u56fe\u50cf\u5b9a\u4f4d\u7684\u57fa\u672c\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5728Python\u4e2d\u8fdb\u884c\u56fe\u50cf\u5b9a\u4f4d\u7684\u57fa\u672c\u6b65\u9aa4\u901a\u5e38\u5305\u62ec\u8bfb\u53d6\u56fe\u50cf\u3001\u9884\u5904\u7406\u56fe\u50cf\u3001\u7279\u5f81\u63d0\u53d6\u548c\u5339\u914d\u3001\u4ee5\u53ca\u5b9a\u4f4d\u76ee\u6807\u7269\u4f53\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5e93\u5982OpenCV\u8fdb\u884c\u56fe\u50cf\u5904\u7406\uff0cPIL\u8fdb\u884c\u56fe\u50cf\u8bfb\u53d6\u548c\u64cd\u4f5c\uff0cNumPy\u8fdb\u884c\u6570\u503c\u8ba1\u7b97\u3002\u5177\u4f53\u64cd\u4f5c\u5305\u62ec\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u3001\u5e94\u7528\u8fb9\u7f18\u68c0\u6d4b\u7b97\u6cd5\u3001\u5bfb\u627e\u8f6e\u5ed3\uff0c\u5e76\u4f7f\u7528\u7279\u5f81\u5339\u914d\u6765\u5b9a\u4f4d\u56fe\u50cf\u4e2d\u7684\u76ee\u6807\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u6709\u54ea\u4e9b\u5e38\u7528\u7684\u5e93\u53ef\u4ee5\u5e2e\u52a9\u8fdb\u884c\u56fe\u50cf\u5b9a\u4f4d\uff1f<\/strong><br \/>\u8fdb\u884c\u56fe\u50cf\u5b9a\u4f4d\u65f6\uff0c\u5e38\u7528\u7684\u5e93\u5305\u62ecOpenCV\u3001Pillow\uff08PIL\uff09\u3001scikit-image\u548cNumPy\u3002OpenCV\u662f\u6700\u4e3a\u5f3a\u5927\u7684\u5de5\u5177\u4e4b\u4e00\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u529f\u80fd\uff0c\u9002\u5408\u5904\u7406\u590d\u6742\u7684\u56fe\u50cf\u5904\u7406\u548c\u5206\u6790\u4efb\u52a1\u3002Pillow\u5219\u975e\u5e38\u9002\u5408\u7b80\u5355\u7684\u56fe\u50cf\u64cd\u4f5c\u548c\u5904\u7406\uff0c\u800cscikit-image\u5219\u4e13\u6ce8\u4e8e\u56fe\u50cf\u5904\u7406\u7b97\u6cd5\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<p><strong>\u5982\u4f55\u63d0\u9ad8Python\u56fe\u50cf\u5b9a\u4f4d\u7684\u51c6\u786e\u6027\uff1f<\/strong><br \/>\u63d0\u9ad8\u56fe\u50cf\u5b9a\u4f4d\u51c6\u786e\u6027\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u66f4\u9ad8\u5206\u8fa8\u7387\u7684\u56fe\u50cf\u3001\u4f18\u5316\u56fe\u50cf\u9884\u5904\u7406\u6b65\u9aa4\uff08\u5982\u53bb\u566a\u58f0\u548c\u589e\u5f3a\u5bf9\u6bd4\u5ea6\uff09\u3001\u9009\u62e9\u5408\u9002\u7684\u7279\u5f81\u63d0\u53d6\u7b97\u6cd5\uff08\u5982SIFT\u3001SURF\u6216ORB\uff09\uff0c\u4ee5\u53ca\u5e94\u7528\u66f4\u5148\u8fdb\u7684\u5339\u914d\u7b97\u6cd5\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u6216\u6df1\u5ea6\u5b66\u4e60\u6280\u672f\u6765\u8bad\u7ec3\u6a21\u578b\uff0c\u4ee5\u8bc6\u522b\u548c\u5b9a\u4f4d\u7279\u5b9a\u7684\u76ee\u6807\uff0c\u4e5f\u80fd\u663e\u8457\u63d0\u5347\u51c6\u786e\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5982\u4f55\u6839\u636e\u4e00\u5f20\u56fe\u7247\u5b9a\u4f4d\uff0c\u901a\u8fc7\u56fe\u50cf\u5904\u7406\u6280\u672f\u8fdb\u884c\u5bf9\u8c61\u68c0\u6d4b\u3001\u4f7f\u7528\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\uff08\u5982OpenCV\uff09\u3001\u5229\u7528\u6df1\u5ea6\u5b66 [&hellip;]","protected":false},"author":3,"featured_media":1056752,"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\/1056745"}],"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=1056745"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1056745\/revisions"}],"predecessor-version":[{"id":1056755,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1056745\/revisions\/1056755"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1056752"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1056745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1056745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1056745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}