{"id":13693,"date":"2025-04-18T20:38:13","date_gmt":"2025-04-18T12:38:13","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/13693.html"},"modified":"2025-04-18T20:38:13","modified_gmt":"2025-04-18T12:38:13","slug":"esp32cam%e8%bf%9c%e7%a8%8b%e5%9b%be%e4%bc%a0%ef%bc%9aai-thinker-esp32-cam-%e3%80%8b-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%85%ac%e7%bd%91-%e6%9c%8d%e5%8a%a1%e5%99%a8-%e3%80%8b-%e7%94%b5%e8%84%91%e6%98%be","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/13693.html","title":{"rendered":"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a"},"content":{"rendered":"<\/p>\n<p>\u00a0\u7528AI Thinker ESP32-CAM\u677f\u5b50\u8bbf\u95ee\u516c\u7f51ip\u76845112\u7aef\u53e3\u5e76\u4e0a\u4f20\u4f60\u7684\u6444\u50cf\u5934\u62cd\u6444\u7684\u56fe\u50cf\u89c6\u9891\u6570\u636e&#xff0c;\u5e76\u5199\u4e00\u6bb5python\u7a0b\u5e8f\u6253\u5f00\u5f39\u7a97\u63a5\u53d7\u56fe\u50cf\u5b9e\u73b0\u8d85\u8fdc\u7a0b\u56fe\u50cf\u4f20\u8f93\u6559\u7a0b\u514d\u8d39<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"639\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123809-680247b1b47df.png\" width=\"813\" \/><\/p>\n<p>1.<\/p>\n<p>\u9996\u5148\u4f60\u8981\u6709\u4e00\u4e2a\u516c\u7f51ip\u4e5f\u5c31\u662f\u53bb\u4e70\u4e00\u53f0\u62e5\u6709\u516c\u7f51\u7684\u670d\u52a1\u5668\u7535\u8111&#xff0c;\u6211\u4e70\u7684\u662f\u817e\u8baf\u4e911\u5e7438\u5143\u7684\u670d\u52a1\u5668\u8fd8\u53ef\u4ee5\u4e0d\u662f\u5f88\u8d35&#xff0c;\u8fd9\u79cd\u7535\u8111\u62e5\u6709\u516c\u7f51ip\u4e5f\u5c31\u662f\u8bf4\u634f\u80fd\u591f\u624b\u673a\u7535\u8111\u8bbf\u95ee\u516c\u7f51\u5b9e\u73b0\u8fdc\u7a0b\u4e0e\u53e6\u5916\u5730\u533a\u7684\u8bbe\u5907\u5efa\u7acb\u8054\u7cfb&#xff0c;\u6bd4\u5982\u6211\u5728\u6df1\u5733\u7684esp32cam\u6211\u5728\u4e91\u6d6e\u4e5f\u80fd\u770b\u5230\u753b\u9762<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"101\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b20b5cf.png\" width=\"366\" \/><\/p>\n<p>\u4e70\u5b8c\u4e4b\u540e\u53f3\u4e0a\u89d2<span style=\"color:#fe2c24\">\u63a7\u5236\u53f0<\/span>&#xff0c;\u70b9\u8fdb\u53bb\u767b\u5f55\u4f60\u7684\u670d\u52a1\u5668<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"133\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b21a908.png\" width=\"399\" \/><\/p>\n<p>\u70b9\u51fb\u4f60\u4e70\u597d\u7684\u670d\u52a1\u5668<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"104\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b22b073.png\" width=\"659\" \/><\/p>\n<p>\u50cf\u6211\u5c31\u662f\u4e70\u7684\u8f7b\u91cf\u7ea7\u5c31\u70b9\u51fb\u5b83&#xff0c;\u53ef\u4ee5\u770b\u5230\u4f60\u7684\u670d\u52a1\u5668&#xff0c;\u53f3\u8fb9\u4e0b\u62c9\u70b9\u51fb\u67e5\u770b\u8be6\u60c5<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"114\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b23a104.png\" width=\"486\" \/><\/p>\n<p>\u5f80\u4e0b\u6ed1\u627e\u5230\u955c\u50cf&#xff0c;\u7136\u540e\u53ef\u4ee5\u9009\u62e9\u91cd\u88c5\u7cfb\u7edf&#xff0c;\u4e00\u822c\u6211\u90fd\u662f\u76f4\u63a5\u88c5Ubuntu\u7b80\u5355\u70b9&#xff0c;\u5236\u4f5c\u955c\u50cf\u662f\u7528\u6765\u4fdd\u5b58\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u7b49\u7b49&#xff0c;\u4f60\u4e0b\u6b21\u53ef\u4ee5\u9009\u62e9\u4f60\u505a\u7684\u955c\u50cf\u52a0\u8f7d\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u76f4\u63a5\u590d\u5236\u4e00\u53f0\u4e00\u6478\u4e00\u6837\u7684<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"213\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b249e68.png\" width=\"413\" \/><\/p>\n<p>\u70b9\u8fdb\u53bb\u586b\u5199\u8fd9\u4e9b&#xff1a;<\/p>\n<p>\u4e0d\u9009\u6700\u65b0\u7684\u7cfb\u7edf\u662f\u56e0\u4e3a\u6709\u4e9b\u8f6f\u4ef6\u4e0d\u4e00\u5b9a\u652f\u6301\u8fd9\u4e2a\u7248\u672c\u7684\u7cfb\u7edf<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"649\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b25b9a2.png\" width=\"1131\" \/><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"565\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b2a783e.png\" width=\"1015\" \/><\/p>\n<p>\u70b9\u51fb\u786e\u8ba4\u5c31\u5b89\u88c5\u7cfb\u7edf\u6210\u529f\u4e86<\/p>\n<p>2.<\/p>\n<p>\u7136\u540e\u4e0b\u8f7d\u914d\u7f6e\u5b9d\u5854<\/p>\n<p>\u53bb\u5b98\u7f51\u4e0b\u8f7d&#xff1a;\u5b9d\u5854\u9762\u677f\u4e0b\u8f7d&#xff0c;\u514d\u8d39\u5168\u80fd\u7684\u670d\u52a1\u5668\u8fd0\u7ef4\u8f6f\u4ef6<\/p>\n<p>\u9009\u62e9\u4f60\u7684\u670d\u52a1\u5668\u7cfb\u7edf\u7c7b\u578b\u590d\u5236\u811a\u672c&#xff0c;\u6211\u7684\u662f\u00b7linux Ubuntu\u7684<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"303\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123810-680247b2d3642.png\" width=\"1342\" \/><\/p>\n<p>\u590d\u5236\u547d\u4ee4&#xff1a;wget -O install_panel.sh https:\/\/download.bt.cn\/install\/install_panel.sh &amp;&amp; sudo bash install_panel.sh ed8484bec<\/p>\n<p>\u7136\u540e\u767b\u5f55\u5e74\u88c5\u597d\u7cfb\u7edf\u7684\u670d\u52a1\u5668&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"98\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b308e80.png\" width=\"681\" \/><\/p>\n<p>\u767b\u9646\u8fdb\u53bb\u5c31\u8fdb\u5165\u4f60\u670d\u52a1\u5668\u7535\u8111\u7684\u63a7\u5236\u53f0\u4e86<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"234\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b3190d1.png\" width=\"1081\" \/><\/p>\n<p>\u628a\u811a\u672c\u7c98\u8d34\u56de\u8f66\u76f4\u63a5\u4e0b\u8f7d<\/p>\n<p>\u4e0b\u8f7d\u6210\u529f\u540e\u4ed6\u4f1a\u7ed9\u4f60\u4e00\u4e2a\u957f\u8fd9\u6837\u7684\u4e1c\u897f&#xff0c;\u628a\u5979\u590d\u5236\u4e0b\u6765\u7c98\u8d34\u5230\u4f60\u7684txt\u6587\u4ef6\u6700\u597d\u6539\u4e0b\u5bc6\u7801&#xff0c;\u6bd4\u5982\u73b0\u5728\u8fd9\u4e2a\u5bc6\u7801\u5c31\u662f\u6211\u7684\u65e7\u5bc6\u7801\u4e0d\u7136\u4f60\u4eec\u4e0d\u662f\u53ef\u4ee5\u767b\u9646\u6211\u7684\u7535\u8111\u4e86\u5417hhh<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"219\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b33d583.png\" width=\"740\" \/><\/p>\n<p>\u7136\u540e\u53bb\u8bbf\u95ee\u4ed6\u7ed9\u4f60\u7684\u5916\u7f51ipv4\u9762\u677f\u7f51\u5740<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"400\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b34f67f.png\" width=\"664\" \/><\/p>\n<p>\u8f93\u5165\u8d26\u53f7\u5bc6\u7801<\/p>\n<p>\u8fdb\u53bb\u627e\u5230\u8f6f\u4ef6\u5546\u5e97\u4e4b\u540e\u70b9\u5f00\u4ed6&#xff0c;\u5728\u8f6f\u4ef6\u641c\u7d22frp\u4e0b\u8f7d<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"775\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b36548b.png\" width=\"1466\" \/><\/p>\n<p>\u5b89\u88c5\u597d\u540e\u70b9\u5f00\u4ed6&#xff0c;<span style=\"color:#fe2c24\">\u518d\u6b21\u5b89\u88c5\u670d\u52a1\u5668\u7aef<\/span>\u5b89\u88c5\u597d\u540e\u5c31\u662f\u6211\u8fd9\u4e2a\u6837\u5b50&#xff0c;\u6211\u4eec\u628a\u6211\u4eec\u7684\u670d\u52a1\u5668\u4f5c\u4e3a\u670d\u52a1\u5668\u7aef\u7535\u8111\u4f5c\u4e3a\u5ba2\u6237\u7aef<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"181\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b3bb4a0.png\" width=\"729\" \/>\u00a0\u7136\u540e\u6253\u5f00\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>\u5907\u7528<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"461\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b3cc564.png\" width=\"101\" \/><\/p>\n<p>\u53bbgithub\u4e0b\u8f7d\u5bf9\u5e94\u7684<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"128\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b3daaef.png\" width=\"536\" \/><\/p>\n<p>\u6309\u4ed6\u7ed9\u7684\u8f6f\u4ef6\u7248\u672c\u4e0b\u8f7d\u6211\u8fd9\u662f0.52.3&#xff0c;\u4ed6\u7ed9\u7684\u94fe\u63a5\u6709\u95ee\u9898\u4e0d\u5982\u6211\u81ea\u5df1\u53bb\u627e<\/p>\n<p>Releases \u00b7 fatedier\/frp<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b3ea0a5.png\" width=\"893\" \/><\/p>\n<p>\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"80\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123812-680247b41295c.png\" width=\"307\" \/><\/p>\n<p>\u4e0b\u8f7d\u540e\u89e3\u538b&#xff0c;\u6253\u5f00&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"146\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123812-680247b4212c3.png\" width=\"667\" \/><\/p>\n<p>\u6253\u5f00\u91cc\u9762\u7684frpc.toml<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"257\" src=\"2025-04-18pskonvtxbni.png\" width=\"106\" \/>\u6309\u4f60\u4e4b\u524d\u7684\u914d\u7f6e\u6765<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"461\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123811-680247b3cc564.png\" width=\"101\" \/>\u586b\u8fdb\u53bb<\/p>\n<p>\u7136\u540e\u53bb\u5b9d\u5854\u5b89\u5168\u628a\u7aef\u53e3\u6253\u5f00&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"215\" src=\"2025-04-18rupk22yi5mx.png\" width=\"847\" \/><\/p>\n<p>\u817e\u8baf\u4e91\u9632\u706b\u5899\u7aef\u53e3\u4e5f\u6253\u5f00<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"449\" src=\"2025-04-18gqywknzmhzw.png\" width=\"365\" \/><\/p>\n<p>\u7136\u540e\u70b9\u5f00\u4f60\u89e3\u538b\u7684\u6587\u4ef6\u7684\u7ec8\u7aef<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"385\" src=\"2025-04-18hq4racd51ao.png\" width=\"1206\" \/><\/p>\n<p>\u8fdb\u53bb\u8f93\u5165<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"445\" src=\"2025-04-18qjs2aclq4un.png\" width=\"928\" \/><\/p>\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u70e7\u5f55esp32cam\u7a0b\u5e8f&#xff1a;<\/p>\n<p>#include &#034;esp_camera.h&#034;<br \/>\n#include &lt;WiFi.h&gt;<br \/>\n#include &lt;HTTPClient.h&gt;<\/p>\n<p>\/\/ WiFi\u914d\u7f6e<br \/>\nconst char *ssid &#061; &#034;Redmi K70&#034;;<br \/>\nconst char *password &#061; &#034;ss20051512&#034;;<\/p>\n<p>\/\/ \u624b\u52a8\u5b9a\u4e49\u6444\u50cf\u5934\u5f15\u811a (AI Thinker ESP32-CAM)<br \/>\n#define PWDN_GPIO_NUM     32<br \/>\n#define RESET_GPIO_NUM    -1  \/\/ \u672a\u4f7f\u7528<br \/>\n#define XCLK_GPIO_NUM      0<br \/>\n#define SIOD_GPIO_NUM     26<br \/>\n#define SIOC_GPIO_NUM     27<br \/>\n#define Y9_GPIO_NUM       35<br \/>\n#define Y8_GPIO_NUM       34<br \/>\n#define Y7_GPIO_NUM       39<br \/>\n#define Y6_GPIO_NUM       36<br \/>\n#define Y5_GPIO_NUM       21<br \/>\n#define Y4_GPIO_NUM       19<br \/>\n#define Y3_GPIO_NUM       18<br \/>\n#define Y2_GPIO_NUM        5<br \/>\n#define VSYNC_GPIO_NUM    25<br \/>\n#define HREF_GPIO_NUM     23<br \/>\n#define PCLK_GPIO_NUM     22<\/p>\n<p>void setup() {<br \/>\n  Serial.begin(115200);<\/p>\n<p>  \/\/ \u6444\u50cf\u5934\u914d\u7f6e<br \/>\n  camera_config_t config;<br \/>\n  config.ledc_channel &#061; LEDC_CHANNEL_0;<br \/>\n  config.ledc_timer &#061; LEDC_TIMER_0;<br \/>\n  config.pin_d0 &#061; Y2_GPIO_NUM;<br \/>\n  config.pin_d1 &#061; Y3_GPIO_NUM;<br \/>\n  config.pin_d2 &#061; Y4_GPIO_NUM;<br \/>\n  config.pin_d3 &#061; Y5_GPIO_NUM;<br \/>\n  config.pin_d4 &#061; Y6_GPIO_NUM;<br \/>\n  config.pin_d5 &#061; Y7_GPIO_NUM;<br \/>\n  config.pin_d6 &#061; Y8_GPIO_NUM;<br \/>\n  config.pin_d7 &#061; Y9_GPIO_NUM;<br \/>\n  config.pin_xclk &#061; XCLK_GPIO_NUM;<br \/>\n  config.pin_pclk &#061; PCLK_GPIO_NUM;<br \/>\n  config.pin_vsync &#061; VSYNC_GPIO_NUM;<br \/>\n  config.pin_href &#061; HREF_GPIO_NUM;<br \/>\n  config.pin_sscb_sda &#061; SIOD_GPIO_NUM;<br \/>\n  config.pin_sscb_scl &#061; SIOC_GPIO_NUM;<br \/>\n  config.pin_pwdn &#061; PWDN_GPIO_NUM;<br \/>\n  config.pin_reset &#061; RESET_GPIO_NUM;<br \/>\n  config.xclk_freq_hz &#061; 20000000;<br \/>\n  config.pixel_format &#061; PIXFORMAT_JPEG;<\/p>\n<p>  if (psramFound()) {<br \/>\n    config.frame_size &#061; FRAMESIZE_SVGA;  \/\/ 800&#215;600<br \/>\n    config.jpeg_quality &#061; 12;            \/\/ 0-63&#xff08;\u6570\u503c\u8d8a\u5c0f\u8d28\u91cf\u8d8a\u9ad8&#xff09;<br \/>\n    config.fb_count &#061; 2;<br \/>\n  } else {<br \/>\n    config.frame_size &#061; FRAMESIZE_CIF;   \/\/ 400&#215;296<br \/>\n    config.jpeg_quality &#061; 12;<br \/>\n    config.fb_count &#061; 1;<br \/>\n  }<\/p>\n<p>  esp_err_t err &#061; esp_camera_init(&amp;config);<br \/>\n  if (err !&#061; ESP_OK) {<br \/>\n    Serial.printf(&#034;\u6444\u50cf\u5934\u521d\u59cb\u5316\u5931\u8d25: 0x%x&#034;, err);<br \/>\n    return;<br \/>\n  }<\/p>\n<p>  \/\/ \u8fde\u63a5WiFi<br \/>\n  WiFi.begin(ssid, password);<br \/>\n  while (WiFi.status() !&#061; WL_CONNECTED) {<br \/>\n    delay(500);<br \/>\n    Serial.print(&#034;.&#034;);<br \/>\n  }<br \/>\n  Serial.println(&#034;\\\\nWiFi\u5df2\u8fde\u63a5&#034;);<br \/>\n}<\/p>\n<p>void loop() {<br \/>\n  if (WiFi.status() &#061;&#061; WL_CONNECTED) {<br \/>\n    camera_fb_t *fb &#061; esp_camera_fb_get();<br \/>\n    if (!fb) {<br \/>\n      Serial.println(&#034;\u56fe\u50cf\u6355\u83b7\u5931\u8d25&#034;);<br \/>\n      return;<br \/>\n    }<\/p>\n<p>    HTTPClient http;<br \/>\n    http.begin(&#034;http:\/\/159.75.100.98:5112\/upload&#034;);<br \/>\n    http.addHeader(&#034;Content-Type&#034;, &#034;image\/jpeg&#034;);<\/p>\n<p>    int httpResponseCode &#061; http.POST(fb-&gt;buf, fb-&gt;len);<\/p>\n<p>    if (httpResponseCode &gt; 0) {<br \/>\n      Serial.printf(&#034;HTTP\u54cd\u5e94\u7801: %d\\\\n&#034;, httpResponseCode);<br \/>\n    } else {<br \/>\n      Serial.printf(&#034;\u9519\u8bef: %s\\\\n&#034;, http.errorToString(httpResponseCode).c_str());<br \/>\n    }<br \/>\n    http.end();<br \/>\n    esp_camera_fb_return(fb);<br \/>\n  }<br \/>\n  delay(1000);<br \/>\n}<br \/>\nfrom flask import Flask, request<br \/>\nimport cv2<br \/>\nimport numpy as np<br \/>\nimport threading<\/p>\n<p>app &#061; Flask(__name__)<br \/>\nlatest_frame &#061; None<br \/>\nlock &#061; threading.Lock()<\/p>\n<p>&#064;app.route(&#039;\/upload&#039;, methods&#061;[&#039;POST&#039;])<br \/>\ndef upload():<br \/>\n    global latest_frame<br \/>\n    image_bytes &#061; request.data<br \/>\n    if image_bytes:<br \/>\n        nparr &#061; np.frombuffer(image_bytes, np.uint8)<br \/>\n        frame &#061; cv2.imdecode(nparr, cv2.IMREAD_COLOR)<br \/>\n        with lock:<br \/>\n            latest_frame &#061; frame.copy()<br \/>\n        return &#034;OK&#034;, 200<br \/>\n    return &#034;No data&#034;, 400<\/p>\n<p>def show_video():<br \/>\n    while True:<br \/>\n        with lock:<br \/>\n            if latest_frame is not None:<br \/>\n                cv2.imshow(&#039;ESP32-CAM Stream&#039;, latest_frame)<br \/>\n        if cv2.waitKey(1) &amp; 0xFF &#061;&#061; ord(&#039;q&#039;):<br \/>\n            break<br \/>\n    cv2.destroyAllWindows()<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    t &#061; threading.Thread(target&#061;show_video)<br \/>\n    t.daemon &#061; True<br \/>\n    t.start()<br \/>\n    app.run(host&#061;&#039;0.0.0.0&#039;, port&#061;5112, threaded&#061;True) <\/p>\n<p>\u5b8c\u6210&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"628\" src=\"2025-04-18rymf24mvcad.png\" width=\"848\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e41\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u9996\u5148\u4f60\u8981\u6709\u4e00\u4e2a\u516c\u7f51ip\u4e5f\u5c31\u662f\u53bb\u4e70\u4e00\u53f0\u62e5\u6709\u516c\u7f51\u7684\u670d\u52a1\u5668\u7535\u8111\uff0c\u6211\u4e70\u7684\u662f\u817e\u8baf\u4e911\u5e7438\u5143\u7684\u670d\u52a1\u5668\u8fd8\u53ef\u4ee5\u4e0d\u662f\u5f88\u8d35\uff0c\u8fd9\u79cd\u7535\u8111\u62e5\u6709\u516c\u7f51ip\u4e5f\u5c31\u662f\u8bf4\u634f\u80fd\u591f\u624b\u673a\u7535\u8111\u8bbf\u95ee\u516c\u7f51\u5b9e\u73b0\u8fdc\u7a0b\u4e0e\u53e6\u5916\u5730\u533a\u7684\u8bbe\u5907\u5efa\u7acb\u8054\u7cfb\uff0c\u6bd4\u5982\u6211\u5728\u6df1\u5733\u7684esp32cam\u6211\u5728\u4e91\u6d6e\u4e5f\u80fd\u770b\u5230\u753b\u9762\u3002\u4e0b\u8f7d\u6210\u529f\u540e\u4ed6\u4f1a\u7ed9\u4f60\u4e00\u4e2a\u957f\u8fd9\u6837\u7684\u4e1c\u897f\uff0c\u628a\u5979\u590d\u5236\u4e0b\u6765\u7c98\u8d34\u5230\u4f60\u7684txt\u6587\u4ef6\u6700\u597d\u6539\u4e0b\u5bc6\u7801\uff0c\u6bd4\u5982\u73b0\u5728\u8fd9\u4e2a\u5bc6\u7801\u5c31\u662f\u6211\u7684\u65e7\u5bc6\u7801\u4e0d\u7136\u4f60\u4eec\u4e0d\u662f\u53ef\u4ee5\u767b\u9646\u6211\u7684\u7535\u8111\u4e86\u5417hhh\u3002\u9009\u62e9\u4f60\u7684\u670d\u52a1\u5668\u7cfb\u7edf\u7c7b\u578b\u590d\u5236\u811a\u672c\uff0c\u6211\u7684\u662f\u00b7linux Ubuntu\u7684\u3002\u7136\u540e\u70b9\u5f00\u4f60\u89e3\u538b\u7684\u6587\u4ef6\u7684\u7ec8\u7aef\u3002<\/p>\n","protected":false},"author":2,"featured_media":13673,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[205,78,191],"topic":[],"class_list":["post-13693","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-tcp-ip","tag-78","tag-191"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a - \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\/13693.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e41\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u9996\u5148\u4f60\u8981\u6709\u4e00\u4e2a\u516c\u7f51ip\u4e5f\u5c31\u662f\u53bb\u4e70\u4e00\u53f0\u62e5\u6709\u516c\u7f51\u7684\u670d\u52a1\u5668\u7535\u8111\uff0c\u6211\u4e70\u7684\u662f\u817e\u8baf\u4e911\u5e7438\u5143\u7684\u670d\u52a1\u5668\u8fd8\u53ef\u4ee5\u4e0d\u662f\u5f88\u8d35\uff0c\u8fd9\u79cd\u7535\u8111\u62e5\u6709\u516c\u7f51ip\u4e5f\u5c31\u662f\u8bf4\u634f\u80fd\u591f\u624b\u673a\u7535\u8111\u8bbf\u95ee\u516c\u7f51\u5b9e\u73b0\u8fdc\u7a0b\u4e0e\u53e6\u5916\u5730\u533a\u7684\u8bbe\u5907\u5efa\u7acb\u8054\u7cfb\uff0c\u6bd4\u5982\u6211\u5728\u6df1\u5733\u7684esp32cam\u6211\u5728\u4e91\u6d6e\u4e5f\u80fd\u770b\u5230\u753b\u9762\u3002\u4e0b\u8f7d\u6210\u529f\u540e\u4ed6\u4f1a\u7ed9\u4f60\u4e00\u4e2a\u957f\u8fd9\u6837\u7684\u4e1c\u897f\uff0c\u628a\u5979\u590d\u5236\u4e0b\u6765\u7c98\u8d34\u5230\u4f60\u7684txt\u6587\u4ef6\u6700\u597d\u6539\u4e0b\u5bc6\u7801\uff0c\u6bd4\u5982\u73b0\u5728\u8fd9\u4e2a\u5bc6\u7801\u5c31\u662f\u6211\u7684\u65e7\u5bc6\u7801\u4e0d\u7136\u4f60\u4eec\u4e0d\u662f\u53ef\u4ee5\u767b\u9646\u6211\u7684\u7535\u8111\u4e86\u5417hhh\u3002\u9009\u62e9\u4f60\u7684\u670d\u52a1\u5668\u7cfb\u7edf\u7c7b\u578b\u590d\u5236\u811a\u672c\uff0c\u6211\u7684\u662f\u00b7linux Ubuntu\u7684\u3002\u7136\u540e\u70b9\u5f00\u4f60\u89e3\u538b\u7684\u6587\u4ef6\u7684\u7ec8\u7aef\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/13693.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T12:38:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123809-680247b1b47df.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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13693.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/13693.html\",\"name\":\"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T12:38:13+00:00\",\"dateModified\":\"2025-04-18T12:38:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/13693.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/13693.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13693.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a\"}]},{\"@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":"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a - \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\/13693.html","og_locale":"zh_CN","og_type":"article","og_title":"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e41\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u9996\u5148\u4f60\u8981\u6709\u4e00\u4e2a\u516c\u7f51ip\u4e5f\u5c31\u662f\u53bb\u4e70\u4e00\u53f0\u62e5\u6709\u516c\u7f51\u7684\u670d\u52a1\u5668\u7535\u8111\uff0c\u6211\u4e70\u7684\u662f\u817e\u8baf\u4e911\u5e7438\u5143\u7684\u670d\u52a1\u5668\u8fd8\u53ef\u4ee5\u4e0d\u662f\u5f88\u8d35\uff0c\u8fd9\u79cd\u7535\u8111\u62e5\u6709\u516c\u7f51ip\u4e5f\u5c31\u662f\u8bf4\u634f\u80fd\u591f\u624b\u673a\u7535\u8111\u8bbf\u95ee\u516c\u7f51\u5b9e\u73b0\u8fdc\u7a0b\u4e0e\u53e6\u5916\u5730\u533a\u7684\u8bbe\u5907\u5efa\u7acb\u8054\u7cfb\uff0c\u6bd4\u5982\u6211\u5728\u6df1\u5733\u7684esp32cam\u6211\u5728\u4e91\u6d6e\u4e5f\u80fd\u770b\u5230\u753b\u9762\u3002\u4e0b\u8f7d\u6210\u529f\u540e\u4ed6\u4f1a\u7ed9\u4f60\u4e00\u4e2a\u957f\u8fd9\u6837\u7684\u4e1c\u897f\uff0c\u628a\u5979\u590d\u5236\u4e0b\u6765\u7c98\u8d34\u5230\u4f60\u7684txt\u6587\u4ef6\u6700\u597d\u6539\u4e0b\u5bc6\u7801\uff0c\u6bd4\u5982\u73b0\u5728\u8fd9\u4e2a\u5bc6\u7801\u5c31\u662f\u6211\u7684\u65e7\u5bc6\u7801\u4e0d\u7136\u4f60\u4eec\u4e0d\u662f\u53ef\u4ee5\u767b\u9646\u6211\u7684\u7535\u8111\u4e86\u5417hhh\u3002\u9009\u62e9\u4f60\u7684\u670d\u52a1\u5668\u7cfb\u7edf\u7c7b\u578b\u590d\u5236\u811a\u672c\uff0c\u6211\u7684\u662f\u00b7linux Ubuntu\u7684\u3002\u7136\u540e\u70b9\u5f00\u4f60\u89e3\u538b\u7684\u6587\u4ef6\u7684\u7ec8\u7aef\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/13693.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T12:38:13+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123809-680247b1b47df.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/13693.html","url":"https:\/\/www.wsisp.com\/helps\/13693.html","name":"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T12:38:13+00:00","dateModified":"2025-04-18T12:38:13+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/13693.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/13693.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/13693.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"esp32cam\u8fdc\u7a0b\u56fe\u4f20\uff1aAI Thinker ESP32-CAM -\u300b \u670d\u52a1\u5668\u516c\u7f51 | \u670d\u52a1\u5668 -\u300b \u7535\u8111\u663e\u793a"}]},{"@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\/13693","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=13693"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/13693\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/13673"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=13693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=13693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=13693"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=13693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}