how can i measure the longest point of my lightning image?
Mostrar comentarios más antiguos

5 comentarios
darova
el 8 de Abr. de 2019
What do you mean longest point
Neptune16
el 8 de Abr. de 2019
Matt J
el 8 de Abr. de 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
Respuesta aceptada
Más respuestas (1)
darova
el 8 de Abr. de 2019
1 voto
Draw black (0,0,0) line you want to calculate the length

See attached script
6 comentarios
Neptune16
el 9 de Abr. de 2019
darova
el 9 de Abr. de 2019
Did you draw black line (0;0;0) ?

Neptune16
el 9 de Abr. de 2019
darova
el 9 de Abr. de 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
el 9 de Abr. de 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
el 9 de Abr. de 2019
thank you
Categorías
Más información sobre Morphological Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

