how can i measure the longest point of my lightning image?
Afficher commentaires plus anciens

5 commentaires
darova
le 8 Avr 2019
What do you mean longest point
Neptune16
le 8 Avr 2019
Matt J
le 8 Avr 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
Réponse acceptée
Plus de réponses (1)
darova
le 8 Avr 2019
1 vote
Draw black (0,0,0) line you want to calculate the length

See attached script
6 commentaires
Neptune16
le 9 Avr 2019
darova
le 9 Avr 2019
Did you draw black line (0;0;0) ?

Neptune16
le 9 Avr 2019
darova
le 9 Avr 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
le 9 Avr 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
le 9 Avr 2019
thank you
Catégories
En savoir plus sur Morphological Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

