2017-03-02 81 views
0

我使用命令轉換picturex.png txt: -得到imagemagick中這個圖像的白色座標

但這個命令是如此緩慢存在的其他替代?

enter image description here

請幫我

+1

你想獲得哪組座標 - 中間的斑點或左下角的矩形?接下來你打算怎麼做?你在使用什麼操作系統? –

+0

blob;我試圖用這些信息來計算距離;即時通訊使用Linux Ubuntu的 – victorhernandezzero

+1

請嘗試一點點,這樣這裏的人可以幫助你更好。你試圖計算什麼距離?總體目標是什麼?如果我們知道你想實現什麼,可能會有更好/更快的解決方案... –

回答

2

我想你想要這樣的:

# Find trim box 
convert mystery.png -median 3x3 -format %@ info: 
13x22+656+353 

# Colour it in 
convert mystery.png -fill "rgba(255,0,0,0.5)" -draw "rectangle 656,353 669,375" result.png 

enter image description here

裁切框寬13個像素×12個像素高,從位於656353左上角。中值濾鏡(-median 3x3)可去除噪點單點像素。

+0

是的作品;非常感謝你 – victorhernandezzero

+1

非常好 - 祝你的項目好運:-) –