top of page
Forum Comments
About changing the interface size
In Questions & Answers
Lucas Chen
Robotiive Staff
Sep 27, 2024
Hi TC,
You can use the following shortcuts to change the interface size.
'Ctrl' + '-'
'Ctrl' + 'Shift' + '+'
1
1
正規表達式問題
詢問一下關於下面這樣寫法,但在前面有中文字的時候會常出現判斷不良,偶爾又會成功如下圖,該如何改善寫法比較適合
In Questions & Answers
關於秒數的問題
In Questions & Answers
正規表達式問題
詢問一下關於下面這樣寫法,但在前面有中文字的時候會常出現判斷不良,偶爾又會成功如下圖,該如何改善寫法比較適合
In Questions & Answers
Lucas Chen
Robotiive Staff
Aug 02, 2024
您好
這個問題是由於原本的正規表達是僅會取出 「數字:數字:數字」的格式
如果您只是單純想取出中文後方的時間可以把正規表達式改成 \d+[:-]\d+[:-]\d+
如果要包含中文的話請改成 \S{0,2}\d+[:-]\d+[:-]\d+
1
2
如下數字判斷問題,讀取的資料這樣會造成測試嚴重錯誤,使用版本為Paddle OCR 動作名稱為SetTextvariablewithAnchor,是否有改善方案
In Questions & Answers
Lucas Chen
Robotiive Staff
Jul 18, 2024
2. 辨識OCR<<<請教你辨識的是圖嗎? ----> 是的在此說明,Doodle 辨識的畫面跟您目前使用的預覽為兩個獨立流程
Doodle 執行流程:
1. 截圖 當下時間假定為 8:05:00
2. 辨識OCR 上面截圖的畫面
3. 回傳結果
預覽畫面流程:
1. 截圖 當下時間點 可能為 8:04:40 或是 8:05:20
該預覽可能早於您觀察時間也可能晚於您觀察時間,因為每個預覽的位置不同,我們無法肯定回覆結論為,因為兩個截圖時間不同,才會導致您以為他辨識錯誤,因為您目前使用的"預覽"時間並未跟Doodle的時間相符。
滑鼠拖曳的使用方式
In Questions & Answers
Lucas Chen
Robotiive Staff
Jul 18, 2024
您可以透過拖曳動作,並將參數的平滑移動打開試試。
來源影像分析的目標請選擇要拖曳的視窗。
目的地影像分析的目標影像請找到一個固定不動的影像,並將興趣點設定在您想要的位置。
偶發判斷不良
In Questions & Answers
Lucas Chen
Robotiive Staff
Jul 17, 2024
您好,
建議您使用 While 讓 OCR 一直執行辨識,並透過 If 判斷,若 OCR 有回傳辨識結果後就跳出迴圈。
詳細腳本如下,請修改 SetVariableFromOCR 的內容即可。
1
1
如下數字判斷問題,讀取的資料這樣會造成測試嚴重錯誤,使用版本為Paddle OCR 動作名稱為SetTextvariablewithAnchor,是否有改善方案
In Questions & Answers
Lucas Chen
Robotiive Staff
Jun 27, 2024
左邊的判別跑去判別當下圖形的變化沒有錯。
您的圖片會一直變化的話可能會導致編輯時與預覽時的影像不同,因為點擊預覽時會再次截圖。
若您要在預覽時確認辨識當下的圖片建議可以多接一個 Preview Block
或是透過 Save Image As File 將圖片儲存至指定路徑後再確認
如下數字判斷問題,讀取的資料這樣會造成測試嚴重錯誤,使用版本為Paddle OCR 動作名稱為SetTextvariablewithAnchor,是否有改善方案
In Questions & Answers
判別問題
In Questions & Answers
如何使用SETVarilbleFormORC克服抓取圖像內容文字,但圖片無法固定
In Questions & Answers
如何使用SETVarilbleFormORC克服抓取圖像內容文字,但圖片無法固定
In Questions & Answers
Lucas Chen
Robotiive Staff
Jun 20, 2024
您好,您可以使用以下 Doodle 實現您想要的功能,只須設定 Region Anchor 、 Region 及 AllResults 即可
Region Anchor:定位圖片
Region:要辨識的文字區域
AllResults:辨識結果變數名稱
即使圖片位置不同一樣可以辨識成功
1
1
擷取一張圖各別判斷圖內容物
In Questions & Answers
Lucas Chen
Robotiive Staff
Jun 19, 2024
您好
可以透過建立 Doodle 來完成您需要的情境,以下以辨識紅綠燈燈號為例,使用的圖片為下圖
1.截圖並框選欲辨識區域(若想辨識整張圖片可以把 Parameter-Region 刪除)
2.設定 Color Filter 的 Color,選擇燈亮時的顏色,並透過 Find Contours 確認在燈暗時不會判斷錯誤 (Find Contours 用於尋找結果的輪廓,若有結果代表辨識成功,沒有則代表辨識失敗)
3.透過 Collection Length 及 Number Compare 取得結果的布林值
4.將辨識結果串接以供後續腳本使用
在腳本內使用 RunDoodle 時只需框選辨識區域並設定結果變數名稱即可
以下是示範的Doodle檔案
1
0
時間格式
In Questions & Answers
等待結果指令問題
In Questions & Answers
想問要如何透過if判斷變數中是否是空值
In Questions & Answers
Lucas Chen
Robotiive Staff
May 28, 2024
您好
如果是想判斷 OCR 是否為空值的話,建議您使用 len() 函式判斷 OCR 回傳的結果長度是否為 0。
若 OCR 判斷為空值的話回傳結果會是空的 List,因此無法將 {{OCR結果[0]["text"]}} 修改為0,建議可以直接將0設定給剪貼簿使用。
實作範例如下:
2
0
如果要針對圖形資料比對該使用那些指令
In Questions & Answers
如果要針對圖形資料比對該使用那些指令
In Questions & Answers
Lucas Chen
Robotiive Staff
May 22, 2024
如果這個畫面出現位置固定的話,建議您可以使用 Run Doodle 中 Advanced 功能的 SetVariableFromOCR
它可以透過 OCR 取得要辨識的數值,詳細設定如下:
1.將 OCR Region 框選至要辨識的區域
2.將 OCR Engine 調整為 PaddleOCR
3.設定輸出變數(VarName)
Run Doodle 取得 OCR 結果後腳本內可透過字串動作中的正規表達式,它可以用於過濾多餘的文字,其詳細參數如下:
之後只要透過 if / else if / else 判斷即可
設定完畢後的範例腳本如下:
其執行結果如下:
1
如果要針對圖形資料比對該使用那些指令
In Questions & Answers
等待結果指令問題
In Questions & Answers
Lucas Chen
Robotiive Staff
May 17, 2024
Hi glen,
從您提供的腳本執行結果來看您第10行的執行結果是 Timeout 而非成功,Timeout 是指在時間限制內沒有找到對應的影像,因此在腳本中被視為 false 。
建議您可以將等待結果的持續時間減少( 1 -> 0.5),並提高時間限制(5 -> 15)以提高該動作的穩定度。
1
2
Lucas Chen
編者
管理員
更多動作
bottom of page