how can i measure the longest point of my lightning image?
Mostra commenti meno recenti

5 Commenti
darova
il 8 Apr 2019
What do you mean longest point
Neptune16
il 8 Apr 2019
Matt J
il 8 Apr 2019
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
Risposta accettata
Più risposte (1)
darova
il 8 Apr 2019
1 voto
Draw black (0,0,0) line you want to calculate the length

See attached script
6 Commenti
Neptune16
il 9 Apr 2019
darova
il 9 Apr 2019
Did you draw black line (0;0;0) ?

Neptune16
il 9 Apr 2019
darova
il 9 Apr 2019
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
il 9 Apr 2019
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
il 9 Apr 2019
thank you
Categorie
Scopri di più su Morphological Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

