我需要查找斑點索引,然後在連續圖像中將其掩蓋。 誰能幫幫我? 請讓我知道如何列出blob的索引。 我使用blob_analyzer分析圖像。 Cheers Mahtabblob索引並將其掩蓋在連續圖像中
0
A
回答
0
這將有助於獲得更多信息,但我假設您使用Coyote IDL庫中的blob_analyzer
。
所以,你從你的形象做一個Blob對象:
blobs = obj_new('blob_analyzer', image)
你可以找出使用NumberOfBlobs
方法很多斑點是如何確定的:
n_blobs = blobs -> NumberOfBlobs()
另外,您可以使用ReportStats
方法獲得有關所有斑點的摘要信息:
blobs -> ReportStats
要獲得第i個斑點指數,使用GetIndices
方法:
indices = blobs -> GetIndices(i)
這應該給你指數的一維向量,它可以轉換爲使用ARRAY_INDICES
2D指數, 如果你想。這將是:
indices_2D = array_indices(image, indices)
爲了掩蓋斑點的形象,你可以簡單地做:
new_image = image ;Make a copy of the original image
new_image[indices] = 0 ;Set all the pixels in the blob to 0
這將,當然,只是掩蓋像素在第i個斑點,但是你可以簡單地做一個循環來重複上述過程來處理所有的斑點。
new_image = image ;Make a copy of the original image
;Loop through and mask blobs
for i = 0, n_blobs - 1 do begin
indices = blobs -> GetIndices(i) ;Get indices for the ith blob
new_image[indices] = 0 ;Mask those pixels
endfor
相關問題
- 1. SSRS掩蓋是連續
- 2. 在opencv中掩蓋圖像
- 3. OpenCV - 遍歷二進制圖像中的每個blob並將其用作掩碼
- 4. 掩蓋UIImage並設置彩色圖像
- 5. 掩蓋圖像並填充顏色
- 6. 畫布:掩蓋圖像並保留其Alpha通道?
- 7. 如何在IOS sdk中掩蓋圖像?
- 8. 在Swift 2.0中掩蓋圖像
- 9. 在Imagemagick中掩蓋圖像的alpha
- 10. :覆蓋前沒有掩蓋圖像時掩藏在
- 11. SVG圖像掩蓋了IE
- 12. 獲得圖像的BLOB值,並將其在PHP
- 13. 用CSS中的圖像掩蓋div
- 14. 將圖像連續對齊
- 15. 如何用KineticJS將另一個PNG圖像掩蓋PNG圖像?
- 16. 在熊貓中過濾連續索引
- 17. 如何從MySQL檢索BLOB圖像並使用PHP將其寫入rtf文件?
- 18. 轉換的blob圖像流,並將其分配到的JLabel
- 19. 檢查Blob圖像並將其用作背景
- 20. 從mysql blob檢索圖像,並在img標籤中顯示
- 21. 定格的背景圖像掩蓋了其他內容
- 22. 3D圖像中的連接組件及其索引
- 23. 用CSS/border-radius掩蓋圖像
- 24. OpenCv4Android:通過圖像掩蓋框架
- 25. 使用路徑掩蓋圖像
- 26. 一個角度掩蓋圖像
- 27. 掩蓋帶圖像的畫布
- 28. 通過圖像掩蓋創建粒子
- 29. 爲什麼圖像被CSS掩蓋了?
- 30. php - imagemagick用黑色掩蓋圖像