{"id":40492,"date":"2025-05-29T09:37:50","date_gmt":"2025-05-29T01:37:50","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/40492.html"},"modified":"2025-05-29T09:37:50","modified_gmt":"2025-05-29T01:37:50","slug":"%e4%bd%bf%e7%94%a8-opencv-%e5%ae%9e%e7%8e%b0%e5%93%88%e5%93%88%e9%95%9c%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/40492.html","title":{"rendered":"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c"},"content":{"rendered":"<p>\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u548c\u56fe\u50cf\u5904\u7406\u9886\u57df&#xff0c;OpenCV \u63d0\u4f9b\u4e86\u975e\u5e38\u5f3a\u5927\u7684\u56fe\u50cf\u51e0\u4f55\u53d8\u6362\u80fd\u529b&#xff0c;\u4e0d\u4ec5\u53ef\u4ee5\u7528\u4e8e\u7ea0\u6b63\u56fe\u50cf&#xff0c;\u8fd8\u80fd\u5236\u9020\u5404\u79cd\u201c\u6709\u8da3\u201d\u7684\u89c6\u89c9\u6548\u679c\u3002\u4eca\u5929&#xff0c;\u6211\u4eec\u5c31\u6765\u5b9e\u73b0\u4e00\u4e2a\u7ecf\u5178\u7684\u201c\u54c8\u54c8\u955c\u201d\u6548\u679c&#xff0c;\u8ba9\u56fe\u50cf\u50cf\u5728\u6e38\u4e50\u56ed\u91cc\u4e00\u6837\u88ab\u62c9\u4f38\u3001\u538b\u7f29\u3001\u626d\u66f2&#xff0c;\u521b\u9020\u51fa\u4ee4\u4eba\u53d1\u7b11\u7684\u9762\u90e8\u6216\u5f62\u4f53\u53d8\u5f62\u3002<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1152\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250529013749-6837ba6d2a1f9.webp\" width=\"864\" \/>&#x1f3af; \u4ec0\u4e48\u662f\u201c\u54c8\u54c8\u955c\u201d&#xff1f;<\/h3>\n<p>\u201c\u54c8\u54c8\u955c\u201d\u662f\u4e00\u79cd\u975e\u7ebf\u6027\u626d\u66f2\u955c\u9762&#xff0c;\u4f1a\u5728\u4e0d\u540c\u533a\u57df\u4ea7\u751f\u653e\u5927\u6216\u7f29\u5c0f\u7684\u89c6\u89c9\u9519\u89c9\u3002\u6211\u4eec\u53ef\u4ee5\u7528\u6570\u5b66\u53d8\u6362\u6a21\u62df\u51fa\u7c7b\u4f3c\u7684\u6548\u679c&#xff0c;\u6bd4\u5982&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6c34\u5e73\u51f9\u9762\/\u51f8\u9762&#xff1a;\u56fe\u50cf\u5de6\u53f3\u8fb9\u7f18\u88ab\u62c9\u4f38\u6216\u6536\u7f29<\/p>\n<\/li>\n<li>\n<p>\u5782\u76f4\u51f9\u9762\/\u51f8\u9762&#xff1a;\u56fe\u50cf\u4e0a\u4e0b\u8fb9\u7f18\u88ab\u62c9\u4f38\u6216\u538b\u7f29<\/p>\n<\/li>\n<li>\n<p>\u4e2d\u5fc3\u51f9\u9762\/\u51f8\u9762&#xff1a;\u56fe\u50cf\u5411\u5185\u6216\u5411\u5916\u81a8\u80c0<\/p>\n<\/li>\n<li>\n<p>\u6c34\u6ce2\u6270\u52a8&#xff1a;\u4ece\u82e5\u5e72\u4e2d\u5fc3\u70b9\u5411\u5916\u6269\u6563\u6ce2\u7eb9&#xff0c;\u6a21\u62df\u6c34\u9762\u6643\u52a8\u611f<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>&#x1f527; \u6280\u672f\u5b9e\u73b0\u539f\u7406<\/h3>\n<p>\u6211\u4eec\u5c06\u4f7f\u7528 OpenCV \u7684 remap \u51fd\u6570&#xff0c;\u5b83\u5141\u8bb8\u6211\u4eec\u901a\u8fc7\u4e24\u4e2a\u6620\u5c04\u77e9\u9635 map_x \u548c map_y&#xff0c;\u5b9a\u4e49\u6bcf\u4e2a\u8f93\u51fa\u50cf\u7d20\u5e94\u8be5\u5bf9\u5e94\u8f93\u5165\u56fe\u50cf\u7684\u54ea\u4e2a\u4f4d\u7f6e\u3002<\/p>\n<p>\u5173\u952e\u5728\u4e8e\u5982\u4f55\u6784\u9020\u8fd9\u4e24\u4e2a\u6620\u5c04\u77e9\u9635&#xff0c;\u8ba9\u5b83\u4eec\u4ea7\u751f\u626d\u66f2\u6548\u679c\u3002<\/p>\n<hr \/>\n<h3>&#x1f9ea; \u793a\u4f8b\u4ee3\u7801&#xff1a;\u4e2d\u5fc3\u51f8\u9762\u6548\u679c&#xff08;\u9c7c\u773c&#xff09;<\/h3>\n<p>import cv2<br \/>\nimport numpy as np<\/p>\n<p>def funhouse_effect(frame):<br \/>\n    h, w &#061; frame.shape[:2]<br \/>\n    map_y, map_x &#061; np.indices((h, w), dtype&#061;np.float32)<\/p>\n<p>    # \u8ba1\u7b97\u56fe\u50cf\u4e2d\u5fc3<br \/>\n    cx, cy &#061; w \/\/ 2, h \/\/ 2<\/p>\n<p>    # \u6784\u9020\u76f8\u5bf9\u5750\u6807<br \/>\n    dx &#061; map_x &#8211; cx<br \/>\n    dy &#061; map_y &#8211; cy<br \/>\n    r &#061; np.sqrt(dx**2 &#043; dy**2)<br \/>\n    r_max &#061; np.max(r)<\/p>\n<p>    # \u63a7\u5236\u626d\u66f2\u5f3a\u5ea6<br \/>\n    k &#061; 0.0008  # \u8d8a\u5927\u8d8a\u626d\u66f2&#xff08;\u4e2d\u5fc3\u51f8\u51fa&#xff09;<\/p>\n<p>    scale &#061; 1 &#043; k * (r**2)  # \u975e\u7ebf\u6027\u653e\u5927<br \/>\n    map_x &#061; cx &#043; dx * scale<br \/>\n    map_y &#061; cy &#043; dy * scale<\/p>\n<p>    # \u4fdd\u8bc1\u6620\u5c04\u8303\u56f4\u5408\u6cd5<br \/>\n    map_x &#061; np.clip(map_x, 0, w &#8211; 1)<br \/>\n    map_y &#061; np.clip(map_y, 0, h &#8211; 1)<\/p>\n<p>    return cv2.remap(frame, map_x, map_y, interpolation&#061;cv2.INTER_LINEAR)<\/p>\n<p>frame &#061; cv2.imread(&#034;face.jpg&#034;)<br \/>\noutput &#061; funhouse_effect(frame)<br \/>\ncv2.imwrite(&#034;distorted.jpg&#034;, output)<\/p>\n<hr \/>\n<h3>&#x1f4da; \u591a\u79cd\u54c8\u54c8\u955c\u6548\u679c<\/h3>\n<p>\u4f60\u53ef\u4ee5\u57fa\u4e8e\u4e0a\u9762\u7684\u601d\u8def\u5b9e\u73b0\u66f4\u591a\u6548\u679c&#xff1a;<\/p>\n<table>\n<tr>\u6548\u679c\u7c7b\u578b\u626d\u66f2\u65b9\u5f0f\u793a\u610f\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u6c34\u5e73\u51f9\u9762<\/td>\n<td>scale &#061; 1 &#8211; k * ((x-cx)\/cx)^2<\/td>\n<td>\u4e2d\u5fc3\u5bbd\u3001\u8fb9\u7a84<\/td>\n<\/tr>\n<tr>\n<td>\u5782\u76f4\u51f8\u9762<\/td>\n<td>scale &#061; 1 &#043; k * ((y-cy)\/cy)^2<\/td>\n<td>\u4e2d\u5fc3\u9f13\u8d77<\/td>\n<\/tr>\n<tr>\n<td>\u4e2d\u5fc3\u51f9\u9762<\/td>\n<td>scale &#061; 1 &#8211; k * r^2<\/td>\n<td>\u8fb9\u7f18\u5927\u3001\u4e2d\u5fc3\u5c0f<\/td>\n<\/tr>\n<tr>\n<td>\u968f\u673a\u6c34\u6ce2\u6270\u52a8<\/td>\n<td>sin(r * \u9891\u7387 &#043; \u76f8\u4f4d) \u53e0\u52a0\u6270\u52a8<\/td>\n<td>\u6c34\u6ce2\u7eb9\u8d77\u4f0f\u611f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>&#x1f504; \u901a\u7528\u6846\u67b6&#xff1a;FrameObject \u5c01\u88c5<\/h3>\n<p>\u4e3a\u4e86\u5728\u5b9e\u65f6\u89c6\u9891\u6216\u5904\u7406\u591a\u4e2a\u5e27\u65f6\u4f7f\u7528&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5c01\u88c5\u4e3a\u5982\u4e0b\u7c7b&#xff1a;<\/p>\n<p>class FrameObject:<br \/>\n    def __init__(self):<br \/>\n        self.mode &#061; &#039;random_wave&#039;  # \u9009\u62e9\u6548\u679c<\/p>\n<p>    def do(self, frame, device):<br \/>\n        h, w &#061; frame.shape[:2]<br \/>\n        map_y, map_x &#061; np.indices((h, w), dtype&#061;np.float32)<br \/>\n        cx, cy &#061; w \/\/ 2, h \/\/ 2<br \/>\n        dx &#061; map_x &#8211; cx<br \/>\n        dy &#061; map_y &#8211; cy<br \/>\n        r &#061; np.sqrt(dx**2 &#043; dy**2)<\/p>\n<p>        if self.mode &#061;&#061; &#039;center_fisheye&#039;:<br \/>\n            scale &#061; 1 &#043; 0.0006 * (r**2)<br \/>\n            map_x &#061; cx &#043; dx * scale<br \/>\n            map_y &#061; cy &#043; dy * scale<\/p>\n<p>        elif self.mode &#061;&#061; &#039;horizontal_cave&#039;:<br \/>\n            scale &#061; 1 &#8211; 0.0012 * ((dx \/ cx) ** 2)<br \/>\n            map_x &#061; cx &#043; dx * scale<br \/>\n            map_y &#061; map_y<\/p>\n<p>        elif self.mode &#061;&#061; &#039;random_wave&#039;:<br \/>\n            for _ in range(np.random.randint(1, 4)):<br \/>\n                wave_cx &#061; np.random.randint(w \/\/ 4, 3 * w \/\/ 4)<br \/>\n                wave_cy &#061; np.random.randint(h \/\/ 4, 3 * h \/\/ 4)<br \/>\n                ddx &#061; map_x &#8211; wave_cx<br \/>\n                ddy &#061; map_y &#8211; wave_cy<br \/>\n                rr &#061; np.sqrt(ddx**2 &#043; ddy**2)<br \/>\n                phase &#061; np.random.uniform(0, 2 * np.pi)<br \/>\n                displacement &#061; 8 * np.sin(rr * 0.05 &#043; phase)<br \/>\n                map_x &#043;&#061; displacement * (ddx \/ (rr &#043; 1e-6))<br \/>\n                map_y &#043;&#061; displacement * (ddy \/ (rr &#043; 1e-6))<\/p>\n<p>        map_x &#061; np.clip(map_x, 0, w &#8211; 1)<br \/>\n        map_y &#061; np.clip(map_y, 0, h &#8211; 1)<br \/>\n        return cv2.remap(frame, map_x, map_y, interpolation&#061;cv2.INTER_LINEAR, borderMode&#061;cv2.BORDER_REFLECT)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"856\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250529013749-6837ba6dbd957.gif\" width=\"640\" \/><\/p>\n<hr \/>\n<h3>&#x1f3a5; \u5e94\u7528\u573a\u666f<\/h3>\n<ul>\n<li>\n<p>\u4e92\u52a8\u955c\u50cf\u8bbe\u5907&#xff08;\u5982\u666f\u533a\u641e\u7b11\u81ea\u62cd&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u89c6\u9891\u6ee4\u955c\u5236\u4f5c&#xff08;\u793e\u4ea4\u5a92\u4f53&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6559\u5b66\u6f14\u793a\u56fe\u50cf\u51e0\u4f55\u53d8\u6362\u539f\u7406<\/p>\n<\/li>\n<li>\n<p>\u56fe\u50cf\u589e\u5f3a&#xff08;\u7528\u4f5c\u6570\u636e\u589e\u5f3a\u7684\u4e00\u79cd\u65b9\u5f0f&#xff09;<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>&#x1f9e0; \u603b\u7ed3<\/h3>\n<p>\u4f7f\u7528 OpenCV&#xff0c;\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u5404\u79cd\u975e\u7ebf\u6027\u56fe\u50cf\u53d8\u6362\u6765\u6a21\u62df\u201c\u54c8\u54c8\u955c\u201d\u6548\u679c\u3002\u672c\u8d28\u4e0a\u662f\u901a\u8fc7\u6784\u5efa\u5408\u9002\u7684\u6620\u5c04\u77e9\u9635 map_x \u548c map_y&#xff0c;\u6765\u63a7\u5236\u6bcf\u4e2a\u50cf\u7d20\u7684\u4f4d\u7f6e\u53d8\u6362\u3002\u914d\u5408\u6b63\u5f26\u6ce2\u3001\u6781\u5750\u6807\u7f29\u653e\u3001\u6307\u6570\u51fd\u6570\u7b49&#xff0c;\u4f60\u53ef\u4ee5\u65e0\u9650\u521b\u9020\u5404\u79cd\u626d\u66f2\u65b9\u5f0f\u3002<\/p>\n<hr \/>\n<p>\u5982\u679c\u4f60\u5bf9\u67d0\u79cd\u7279\u5b9a\u53d8\u5f62\u65b9\u5f0f\u611f\u5174\u8da3&#xff0c;\u6216\u8005\u60f3\u5c06\u5176\u7528\u4e8e\u5b9e\u65f6\u89c6\u9891\u6d41\u3001\u4ea4\u4e92\u7cfb\u7edf\u4e2d&#xff0c;\u6b22\u8fce\u7559\u8a00\u4ea4\u6d41&#xff01;&#x1f389;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb773\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf6\u6b21\u3002OpenCV\u5728\u56fe\u50cf\u5904\u7406\u4e2d\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u51e0\u4f55\u53d8\u6362\u529f\u80fd\uff0c\u80fd\u591f\u5b9e\u73b0\u5404\u79cd\u89c6\u89c9\u6548\u679c\uff0c\u5982\u201c\u54c8\u54c8\u955c\u201d\u6548\u679c\u3002\u901a\u8fc7\u975e\u7ebf\u6027\u626d\u66f2\uff0c\u56fe\u50cf\u53ef\u4ee5\u5728\u4e0d\u540c\u533a\u57df\u4ea7\u751f\u653e\u5927\u6216\u7f29\u5c0f\u7684\u89c6\u89c9\u9519\u89c9\uff0c\u5982\u6c34\u5e73\u51f9\u9762\u3001\u5782\u76f4\u51f8\u9762\u3001\u4e2d\u5fc3\u51f9\u9762\u548c\u6c34\u6ce2\u6270\u52a8\u7b49\u3002\u4f7f\u7528OpenCV\u7684remap\u51fd\u6570\uff0c\u901a\u8fc7\u6784\u9020\u6620\u5c04\u77e9\u9635map_x\u548cmap_y\uff0c\u53ef\u4ee5\u5b9a\u4e49\u6bcf\u4e2a\u8f93\u51fa\u50cf\u7d20\u5bf9\u5e94\u7684\u8f93\u5165\u56fe\u50cf\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u626d\u66f2\u6548\u679c\u3002\u793a\u4f8b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0\u4e2d\u5fc3\u51f8\u9762\u6548\u679c\uff08\u9c7c\u773c\uff09\uff0c\u5e76\u63d0\u4f9b\u4e86\u591a\u79cd\u54c8\u54c8\u955c\u6548\u679c\u7684\u5b9e\u73b0\u601d\u8def\u3002\u6b64\u5916\uff0c\u8fd8\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u8fd9\u4e00\u529f\u80fd\u5c01\u88c5\u4e3a\u7c7b\uff0c\u4ee5\u4fbf\u5728\u5b9e\u65f6\u89c6\u9891\u6216\u5904\u7406\u591a\u4e2a\u5e27\u65f6\u4f7f\u7528\u3002\u5e94\u7528\u573a\u666f\u5305\u62ec\u4e92\u52a8\u955c\u50cf\u8bbe\u5907\u3001\u89c6\u9891\u6ee4\u955c\u5236<\/p>\n","protected":false},"author":2,"featured_media":40490,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1460,3703,81,50,3704,523],"topic":[],"class_list":{"0":"post-40492","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-opencv","10":"tag-python","11":"tag-50","12":"tag-3704","13":"tag-523"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c - \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\/40492.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb773\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf6\u6b21\u3002OpenCV\u5728\u56fe\u50cf\u5904\u7406\u4e2d\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u51e0\u4f55\u53d8\u6362\u529f\u80fd\uff0c\u80fd\u591f\u5b9e\u73b0\u5404\u79cd\u89c6\u89c9\u6548\u679c\uff0c\u5982\u201c\u54c8\u54c8\u955c\u201d\u6548\u679c\u3002\u901a\u8fc7\u975e\u7ebf\u6027\u626d\u66f2\uff0c\u56fe\u50cf\u53ef\u4ee5\u5728\u4e0d\u540c\u533a\u57df\u4ea7\u751f\u653e\u5927\u6216\u7f29\u5c0f\u7684\u89c6\u89c9\u9519\u89c9\uff0c\u5982\u6c34\u5e73\u51f9\u9762\u3001\u5782\u76f4\u51f8\u9762\u3001\u4e2d\u5fc3\u51f9\u9762\u548c\u6c34\u6ce2\u6270\u52a8\u7b49\u3002\u4f7f\u7528OpenCV\u7684remap\u51fd\u6570\uff0c\u901a\u8fc7\u6784\u9020\u6620\u5c04\u77e9\u9635map_x\u548cmap_y\uff0c\u53ef\u4ee5\u5b9a\u4e49\u6bcf\u4e2a\u8f93\u51fa\u50cf\u7d20\u5bf9\u5e94\u7684\u8f93\u5165\u56fe\u50cf\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u626d\u66f2\u6548\u679c\u3002\u793a\u4f8b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0\u4e2d\u5fc3\u51f8\u9762\u6548\u679c\uff08\u9c7c\u773c\uff09\uff0c\u5e76\u63d0\u4f9b\u4e86\u591a\u79cd\u54c8\u54c8\u955c\u6548\u679c\u7684\u5b9e\u73b0\u601d\u8def\u3002\u6b64\u5916\uff0c\u8fd8\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u8fd9\u4e00\u529f\u80fd\u5c01\u88c5\u4e3a\u7c7b\uff0c\u4ee5\u4fbf\u5728\u5b9e\u65f6\u89c6\u9891\u6216\u5904\u7406\u591a\u4e2a\u5e27\u65f6\u4f7f\u7528\u3002\u5e94\u7528\u573a\u666f\u5305\u62ec\u4e92\u52a8\u955c\u50cf\u8bbe\u5907\u3001\u89c6\u9891\u6ee4\u955c\u5236\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/40492.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-29T01:37:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250529013749-6837ba6d2a1f9.webp\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/40492.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/40492.html\",\"name\":\"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-29T01:37:50+00:00\",\"dateModified\":\"2025-05-29T01:37:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/40492.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/40492.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/40492.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c\"}]},{\"@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":"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c - \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\/40492.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb773\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf6\u6b21\u3002OpenCV\u5728\u56fe\u50cf\u5904\u7406\u4e2d\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u51e0\u4f55\u53d8\u6362\u529f\u80fd\uff0c\u80fd\u591f\u5b9e\u73b0\u5404\u79cd\u89c6\u89c9\u6548\u679c\uff0c\u5982\u201c\u54c8\u54c8\u955c\u201d\u6548\u679c\u3002\u901a\u8fc7\u975e\u7ebf\u6027\u626d\u66f2\uff0c\u56fe\u50cf\u53ef\u4ee5\u5728\u4e0d\u540c\u533a\u57df\u4ea7\u751f\u653e\u5927\u6216\u7f29\u5c0f\u7684\u89c6\u89c9\u9519\u89c9\uff0c\u5982\u6c34\u5e73\u51f9\u9762\u3001\u5782\u76f4\u51f8\u9762\u3001\u4e2d\u5fc3\u51f9\u9762\u548c\u6c34\u6ce2\u6270\u52a8\u7b49\u3002\u4f7f\u7528OpenCV\u7684remap\u51fd\u6570\uff0c\u901a\u8fc7\u6784\u9020\u6620\u5c04\u77e9\u9635map_x\u548cmap_y\uff0c\u53ef\u4ee5\u5b9a\u4e49\u6bcf\u4e2a\u8f93\u51fa\u50cf\u7d20\u5bf9\u5e94\u7684\u8f93\u5165\u56fe\u50cf\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u626d\u66f2\u6548\u679c\u3002\u793a\u4f8b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0\u4e2d\u5fc3\u51f8\u9762\u6548\u679c\uff08\u9c7c\u773c\uff09\uff0c\u5e76\u63d0\u4f9b\u4e86\u591a\u79cd\u54c8\u54c8\u955c\u6548\u679c\u7684\u5b9e\u73b0\u601d\u8def\u3002\u6b64\u5916\uff0c\u8fd8\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u8fd9\u4e00\u529f\u80fd\u5c01\u88c5\u4e3a\u7c7b\uff0c\u4ee5\u4fbf\u5728\u5b9e\u65f6\u89c6\u9891\u6216\u5904\u7406\u591a\u4e2a\u5e27\u65f6\u4f7f\u7528\u3002\u5e94\u7528\u573a\u666f\u5305\u62ec\u4e92\u52a8\u955c\u50cf\u8bbe\u5907\u3001\u89c6\u9891\u6ee4\u955c\u5236","og_url":"https:\/\/www.wsisp.com\/helps\/40492.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-29T01:37:50+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250529013749-6837ba6d2a1f9.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/40492.html","url":"https:\/\/www.wsisp.com\/helps\/40492.html","name":"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-29T01:37:50+00:00","dateModified":"2025-05-29T01:37:50+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/40492.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/40492.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/40492.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528 OpenCV \u5b9e\u73b0\u54c8\u54c8\u955c\u6548\u679c"}]},{"@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\/40492","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=40492"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/40492\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/40490"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=40492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=40492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=40492"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=40492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}