Approximation of area of an image
1 回表示 (過去 30 日間)
I want to approximate an area with a circle as in the attached image (which is manually drawn).
I have three somewhat distinct peaks in the histogram but i think the image needs to be pre-processed in order to achive a good result. I have tried to smoothen the image, opening and closing but it does not get me to where i want to be.
Any suggestions would be greatly appriciated!
回答 (1 件)
Timo Dietz 2021 年 1 月 5 日
編集済み: Timo Dietz 2021 年 1 月 5 日
Personally, I would try this:
1) Introduce an intensity threshold. All pixels below will be treated as 0, all above as 1.
2) Now, start from center of the image and move to the image boundary in multiple rays with different angle (0 to 360°) - like a star shape - and stop as soon as a 0-pixel is hit.
3) Collect all ray lengths. The minimum gives you the shortest distance (from center) where a void exists and thus the radius.
4) Play around with angle step / number of rays and intensity threshold to adjust processing time to needed detection coverage.
What do you think? Do you get my point?