我用SURF爲特徵檢測,然後我已經使用RANSAC。我得到的縫合圖像有接縫。我如何刪除這些?圖像拼接方法去除接縫爲縫合圖像
0
A
回答
2
我實施了縫合眼視網膜的圖像接縫的去除。下面你可以找到最終的效果:
要做到這一點,我實現了this紙138頁中描述的技術。下面你可以找到解釋的僞代碼,完整的源代碼可以在my repository上找到。
算法是基於通過執行重疊在該像素的圖像的像素值的計算weighted average像素的最終值。權重基於從像素到圖像邊緣的距離。如果像素更接近它所屬圖像的中心,則更重要,重量更大。像素到圖像邊緣的距離可以通過使用由OpenCV實現的功能distanceTransform
來計算。這是放在最後的鑲嵌眼睛的視網膜圖像的一個轉變距離的影響:
下面你可以找到僞代碼:
// Images is an array of images that the program is stitching
// For every image (after transform) on final plane calculate distance transform
for (image in images) {
// Calculate distance transform
image.distanceTransform = distanceTransform(image)
}
// For every pixel in final mosaic, calulate its value by using weighted average
for (row in rows) {
for (col in cols) {
currentPixel = FinalMosaic(col, row)
// Values for weighted average
numeratorSum = 0
denominatorSum = 0
// Go through all images that can overlap at this pixel
for (image in images) {
// If image is not overlapping over this pixel just skip
isOverlapping = image.isOverlapping(currentPixel)
if (isOverlapping) {
currentPixelWeight = image.distanceTransform.valueAt(currentPixel)
numeratorSum += currentPixelWeight * currentPixel.value
denominatorSum += currentPixelWeight
}
}
if (denominatorSum != 0) {
currentPixel.value = numeratorSum/denominatorSum
}
}
}
如果有不清楚的地方,寫在題評論和我會盡力改善答案。
-2
相關問題
- 1. 如何去除縫合的全景圖像中的接縫?
- 2. 如何縫合多個高度圖以去除接縫?
- 3. Three.js去除接縫
- 4. Alpha混合刪除圖像中的接縫
- 5. 法線貼圖接縫接壤
- 6. 圖像拼接
- 7. 無法拼接圖像
- 8. 使用相機參數從縫合一組圖像使用縫合不同的圖像集
- 9. R拼接圖像
- 10. 圖像拼接&OCR
- 11. OpenCV - 圖像拼接
- 12. 接縫對話
- 13. 當更新圖像時,二進制數據接縫被截斷
- 14. jQuery或PHP無縫圖像庫
- 15. 無縫圖像替換/更新
- 16. css背景圖像不是無縫的
- 17. 圖像操作縫雕 - 雕刻順序
- 18. 圖像拼接超過2圖像
- 19. excelExporter非法導航接縫
- 20. Python - 圖像拼接和混合
- 21. 我們可以拼接圖像混合
- 22. 圖像拼接環路閉合
- 23. Matlab:圖像拼接和混合
- 24. 接縫紋理球面貼圖Unity3D C#
- 25. jndi圖案和接縫2.3耳
- 26. IdentityManager接縫問題
- 27. 的PHPUnit和接縫
- 28. 接縫測試NoSuchMethodError
- 29. .NET中的鏈接接縫
- 30. 在Python中拼接圖像
針?他們是直的嗎?角?可變大小?隨機? – gpasch
它們實際上在兩個圖像被縫合的點處是有角度的。 – user6053898
確定顯示一些圖片 – gpasch