how can i measure the longest point of my lightning image?
古いコメントを表示

5 件のコメント
darova
2019 年 4 月 8 日
What do you mean longest point
Neptune16
2019 年 4 月 8 日
Matt J
2019 年 4 月 8 日
Maybe? You don't know?
The straight line distance from red to orange, or the distance when walking along the lightning fork? If the latter, there are several implementations of Dijkstra's algorithm on the file exchange
採用された回答
その他の回答 (1 件)
darova
2019 年 4 月 8 日
1 投票
Draw black (0,0,0) line you want to calculate the length

See attached script
6 件のコメント
Neptune16
2019 年 4 月 9 日
darova
2019 年 4 月 9 日
Did you draw black line (0;0;0) ?

Neptune16
2019 年 4 月 9 日
darova
2019 年 4 月 9 日
When you draw black line (color - (0;0;0), look in paint for example) script takes only black pixels

Then imfil() function clears single pixels we dont want

From thick line we get thin with bwmorph()

Using again bwmorph() to get clear line

Find nonzero indices (coordinates) to get a curve
Image Analyst
2019 年 4 月 9 日
If you're going to draw a black line with paint, then you might as well use imfreehand() in MATLAB. I think he was looking for an automatic way, like me (below) or Matt J (above in comments section) suggested. That said, sometimes it's more time effective to employ user-assisted image analysis than trying months or years to get an automatic method (luckily this application won't take anywhere near that long).
darova
2019 年 4 月 9 日
thank you
カテゴリ
ヘルプ センター および File Exchange で Morphological Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

