主頁 >  其他 > 資料結構與演算法——圖(游戲中的自動尋路-A*演算法)

資料結構與演算法——圖(游戲中的自動尋路-A*演算法)

2020-12-13 06:42:12 其他

在復雜的 3D 游戲環境中如何能使非玩家控制角色準確實作自動尋路功能成為了 3D 游戲開 發技術中一大研究熱點,其中 A*演算法得到了大量的運用,A*演算法較之傳統的路徑規劃演算法,實時性更高、靈活性更強,尋路 結果更加接近人工選擇的路徑結果. A*尋路演算法并不是找到最優路徑,只是找到相對近的路徑,因為找最優要把所有可行 路徑都找出來進行對比,消耗性能太大,尋路效果只要相對近路徑就行了,

 

 

1.A* 演算法的原理(如顯示不全 重繪重試)

我們假設在推箱子游戲中人要從站里的地方移動到右側的箱子目的地,但是這兩點之間被一堵墻隔開,

 

我們下一步要做的便是查找最短路徑,既然是 AI 演算法, A* 演算法和人尋找路徑的做法十分類似,當我們離目標較遠時,我 們的目標方向是朝向目的點直線移動,但是在近距離上因為各種障礙需要繞行(走彎路)!而且已走過的地方就無須再次 嘗試,

為了簡化問題,我們把要搜尋的區域劃分成了正方形的格子,這是尋路的第一步,簡化搜索區域,就像推箱子游戲一樣, 這樣就把我們的搜索區域簡化為了 2 維陣列,陣列的每一項代表一個格子,它的狀態就是可走 (walkalbe) 和不可走 (unwalkable) ,通過計算出從起點到終點需要走過哪些方格,就找到了路徑,一旦路徑找到了,人物便從一個方格的中心 移動到另一個方格的中心,直至到達目的地,

簡化搜索區域以后,如何定義小人當前走要走的格子離終點是近是遠呢?我們需要兩個指標來表示:

  • G 表示從起點移動到網格上指定方格的移動距離 (暫時不考慮沿斜向移動,只考慮上下左右移動),
  • H 表示從指定的方格移動到終點的預計移動距離,只計算直線距離 (H 有很多計算方法, 這里我們設定只可以上 下左右移動,即該點與終點的直線距離),

 

令 F = G + H ,F 即表示從起點經過此點預計到終點的總移動距離接下來我們從起點開始,按照以下尋路步驟,直至找到目標,

 

2.尋路步驟

1. 從起點開始, 把它作為待處理的方格存入一個預測可達的節點串列,簡稱 openList, 即把起點放入“預測可達節點串列”, 可達節點串列 openList 就是一個等待檢查方格的串列,

2. 尋找 openList 中 F 值最小的點 min(一開始只有起點)周圍可以到達的方格(可到達的意思是其不是障礙物,也不存 在關閉串列中的方格,即不是已走過的方格),計算 min 周圍可到達的方格的 F 值,將還沒在 openList 中點放入其中, 并 設定它們的"父方格"為點 min,表示他們的上一步是經過 min 到達的,如果 min 下一步某個可到達的方格已經在 openList 串列那么并且經 min 點它的 F 值更優,則修改 F 值并把其"父方格"設為點 min,

3. 把 2 中的點 min 從"開啟串列"中洗掉并存入"關閉串列"closeList 中, closeList 中存放的都是不需要再次檢查的方格,如 果 2 中點 min 不是終點并且開啟串列的數量大于零,那么繼續從第 2 步開始,如果是終點執行第 4 步,如果 openList 列 表數量為零,那么就是找不到有效路徑,

4.如果第 3 步中 min 是終點,則結束查找,直接追溯父節點到起點的路徑即為所選路徑

 

 具體尋路步步驟如下所示:

 

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3.演算法實作

Astar.h

 1 #pragma once
 2 
 3 #include <list>
 4 
 5 const int kCost1 = 10; //直移一格消耗
 6 const int kCost2 = 14; //斜移一格消耗
 7 
 8 typedef struct _Point
 9 {
10     int x,y; //點坐標,這里為了方便按照 C++的陣列來計算,x 代表橫排,y 代表豎列
11     int F,G,H; //F=G+H
12     struct _Point *parent; //parent 的坐標
13 }Point;
14 
15 /*分配一個節點(格子)*/
16 Point* AllocPoint(int x, int y);
17 
18 /*初始化地圖*/
19 void InitAstarMaze(int *_maze, int _lines, int _colums);
20 
21 /*通過 A* 演算法尋找路徑*/
22 std::list<Point *> GetPath(Point *startPoint, Point *endPoint);
23 
24 /*清理資源,結束后必須呼叫*/
25 void ClearAstarMaze();

 

 

 Astar.cpp

  1 #include <math.h>
  2 #include "Astar.h"
  3 #include <iostream>
  4 #include <vector>
  5 
  6 static int *maze;                        //迷宮對應的二維陣列,使用一級指標表示
  7 static int cols;                        //二維陣列對應的列數
  8 static int lines;                        //二維陣列對應的行數
  9 static std::list<Point *> openList;        //開放串列
 10 static std::list<Point *> closeList;    //關閉串列
 11 
 12 /*搜索從起點到終點的最佳路徑*/
 13 static Point* findPath(Point *startPoint,Point *endPoint) ;
 14 /*從開啟串列中回傳 F 值最小的節點*/
 15 static Point *getLeastFpoint();
 16 /*獲取當前點周圍可達的節點*/
 17 static std::vector<Point *> getSurroundPoints(const Point *point);
 18 /*判斷某點是否可以用于下一步判斷 */
 19 static bool isCanreach(const Point *point,const Point *target);
 20 /*判斷開放/關閉串列中是否包含某點*/
 21 static Point *isInList(const std::list<Point *> &list,const Point *point);
 22 //計算 FGH 值
 23 static int calcG(Point *temp_start,Point *point);
 24 static int calcH(Point *point,Point *end);
 25 static int calcF(Point *point);
 26 
 27 /*分配一個節點(格子)*/
 28 Point* AllocPoint(int x, int y)
 29 {
 30     Point *temp = new Point;
 31     memset(temp, 0, sizeof(Point));        //初始值清零
 32     temp->x = x;
 33     temp->y = y;
 34     return temp;
 35 }
 36 
 37 /*初始化 A*搜索的地圖*/
 38 void InitAstarMaze(int *_maze, int _lines, int _colums)
 39 {
 40     maze = _maze;
 41     lines = _lines;
 42     cols = _colums;
 43 }
 44 
 45 /*通過 A* 演算法尋找路徑*/
 46 std::list<Point *> GetPath(Point *startPoint, Point *endPoint)
 47 {
 48     Point *result=findPath(startPoint, endPoint);
 49     std::list<Point *> path;
 50     
 51     //回傳路徑,如果沒找到路徑,回傳空鏈表
 52     while(result)
 53     {
 54         path.push_front(result);
 55         result=result->parent;
 56     }
 57     return path;
 58 }
 59 
 60 /*搜索從起點到終點的最佳路徑*/
 61 static Point* findPath(Point *startPoint,Point *endPoint)
 62 {
 63     openList.push_back(AllocPoint(startPoint->x, startPoint->y));    //置入起點,拷貝開辟一個節點,內外隔離
 64     while(!openList.empty())
 65     {
 66         //第一步,從開放串列中取最小 F 的節點
 67         Point *curPoint = getLeastFpoint();            //找到 F 值最小的點
 68         
 69         //第二步,把當前節點放到關閉串列中
 70         openList.remove(curPoint);
 71         closeList.push_back(curPoint);
 72         
 73         //第三步,找到當前節點周圍可達的節點,并計算 F 值
 74         std::vector<Point *> surroundPoints = getSurroundPoints(curPoint);
 75         std::vector<Point *>::const_iterator iter;
 76         
 77         for(iter=surroundPoints.begin();iter!=surroundPoints.end();    iter++)
 78         {
 79             Point *target = *iter;
 80             
 81             //對某一個格子,如果它不在開放串列中,加入到開啟串列,設定當前格為其父節點,計算 F G H
 82             Point *exist = isInList(openList, target);
 83             if(!exist)
 84             {
 85                 target->parent=curPoint;
 86                 target->G=calcG(curPoint,target);
 87                 target->H=calcH(target,endPoint);
 88                 target->F=calcF(target);
 89                 openList.push_back(target);
 90             }
 91             else
 92             {
 93                 int tempG = calcG(curPoint, target);
 94                 if(tempG<target->G)
 95                 {
 96                     exist->parent = curPoint;
 97                     exist->G=tempG;
 98                     exist->F=calcF(target);
 99                 }
100                 delete target;
101             }
102         }//end for
103         
104         surroundPoints.clear();
105         Point *resPoint = isInList(openList, endPoint);
106         if(resPoint)
107         {
108             return resPoint;
109         }
110     }
111     return NULL;
112 }
113 
114 /*從開啟串列中回傳 F 值最小的節點*/
115 static Point *getLeastFpoint()
116 {
117     if(!openList.empty())
118     {
119         Point *resPoint = openList.front();
120         std::list<Point*>::const_iterator itor;
121         
122         for(itor = openList.begin(); itor!= openList.end(); itor++)
123         {
124             if((*itor)->F < resPoint->F)
125             {
126                 resPoint = *itor;
127             }
128         }
129         return resPoint;
130     }
131     return NULL;
132 }
133 
134 /*獲取當前點周圍可達的節點*/
135 static std::vector<Point *> getSurroundPoints(const Point *point)
136 {
137     std::vector<Point *> surroundPoints;
138     for(int x=point->x-1; x<=point->x+1; x++)
139     {
140         for(int y=point->y-1; y<=point->y+1; y++)
141         {
142             Point *temp = AllocPoint(x, y);
143             if(isCanreach(point, temp))
144             {
145                 surroundPoints.push_back(temp);
146             }
147             else 
148             {
149                 delete temp;
150             }
151         }
152     }
153     return surroundPoints;
154 }
155 
156 /*判斷某點是否可以用于下一步判斷 */
157 static bool isCanreach(const Point *point,const Point *target)
158 {
159     if(target->x<0||target->x>(lines-1)
160     ||target->y<0||target->y>(cols-1)
161     ||maze[target->x *cols + target->y]==1
162     ||maze[target->x *cols + target->y]==2
163     ||(target->x==point->x && target->y==point->y)
164     ||isInList(closeList, target))
165     {
166         return false;
167     }
168     if(abs(point->x-target->x)+abs(point->y-target->y)==1)
169     {
170         return true;
171     }
172     else
173     {
174         return false;
175     }
176 }
177 static Point* isInList(const std::list<Point *> &list,const Point *point)
178 {
179     //判斷某個節點是否在串列中,這里不能比較指標,因為每次加入串列是新開辟的節點,只能比較坐標
180     std::list<Point *>::const_iterator itor;
181     for(itor = list.begin(); itor!=list.end();itor++)
182     {
183         if((*itor)->x==point->x&&(*itor)->y==point->y) 
184         {
185             return *itor;
186         }
187     }
188     return NULL;
189 }
190 
191 /*計算節點的 G 值*/
192 static int calcG(Point *temp_start, Point *point)
193 {
194     int    extraG=(abs(point->x-temp_start->x)+abs(point->y-temp_start->y))==1?kCost1:kCost2;
195     
196     //如果是初始節點,則其父節點是空
197     int parentG=(point->parent==NULL? NULL:point->parent->G);
198     
199     return parentG+extraG;
200 }
201 
202 static int calcH(Point *point,Point *end)
203 {
204     //用簡單的歐幾里得距離計算 H,可以用多中方式實作
205     return (int)sqrt((double)(end->x-point->x)*
206     (double)(end->x-point->x)+(double)(end->y-point->y)*
207     (double)(end->y-point->y))*kCost1;
208 }
209 
210 /*計算節點的 F 值*/
211 static int calcF(Point *point)
212 {
213     return point->G+ point->H;
214 }
215 
216 /*清理資源,結束后必須呼叫*/
217 void ClearAstarMaze()
218 {
219     maze = NULL;
220     lines = 0;
221     cols = 0;
222     std::list<Point *>::iterator itor;
223     
224     //清除 openList 中的元素
225     for(itor = openList.begin(); itor!=openList.end();)
226     {
227         delete *itor;
228         itor = openList.erase(itor);//獲取到下一個節點
229     }
230     
231     //清理 closeList 中的元素
232     for(itor = closeList.begin(); itor!=closeList.end();)
233     {
234         delete *itor;
235         itor = closeList.erase(itor);
236     }
237 }

 

 

 main.cpp

 1 #include "Astar.h"
 2 #include <list>
 3 #include <iostream>
 4 #include <windows.h>
 5 
 6 using namespace std;
 7 
 8 //定義地圖陣列,二維陣列在記憶體順序存盤的
 9 int map[13][13] = {
10 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
11 { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, },
12 { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, },
13 { 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, },
14 { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, },
15 { 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, },
16 { 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, },
17 { 2, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 2, },
18 { 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, },
19 { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, },
20 { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, },
21 { 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, },
22 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
23 };
24 
25 void AStarTest()
26 {
27     InitAstarMaze(&map[0][0], 13, 13);
28     
29     //設定起始和結束點
30     Point* start = AllocPoint(12, 4);
31     Point* end = AllocPoint(0, 0);
32     
33     //A*演算法找尋路徑
34     list<Point *> path = GetPath(start, end);
35     cout<<"尋路結果:"<<endl;
36     list<Point *>::const_iterator iter;
37     
38     for(iter=path.begin(); iter!=path.end(); iter++)
39     {
40         Point *cur = *iter;
41         cout<<'('<<cur->x<<','<<cur->y<<')'<<endl;
42         Sleep(800);
43     }
44     
45     ClearAstarMaze();
46 }
47 
48 int main(void)
49 {
50     AStarTest();
51     system("pause");
52     return 0;
53 }

 

 

 

 

 

 

 

============================================================================================================

 

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/233834.html

標籤:其他

上一篇:0865. Smallest Subtree with all the Deepest Nodes (M)

下一篇:2020軟體測驗工程師面試題匯總(內含答案)-看完BATJ面試官對你豎起大拇指!

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more