Effacer les filtres
Effacer les filtres

Find local maximum from jpg

1 vue (au cours des 30 derniers jours)
Siegmund Nuyts
Siegmund Nuyts le 7 Jan 2022
I have a rgb JPG image and I'm wondering if I could extract local maximum from it.
The picture represents water on the beach so I'd like to quantify the edge of the water.
Could I for example draw transects over the JPG and extract the colour difference between water vs sand and then use 'findpeaks'?
Anyone suggestions on how to approach this?
  2 commentaires
yanqi liu
yanqi liu le 8 Jan 2022
yes,sir,may i ask what is target?get the water edge and compare?
Siegmund Nuyts
Siegmund Nuyts le 8 Jan 2022
Yes, ideally the individual peaks of the water edge in order to then compare (max, min, mean, ...)

Connectez-vous pour commenter.

Réponses (2)

Walter Roberson
Walter Roberson le 7 Jan 2022
JPG image ... quantify
Unless you are using the extremely-uncommon Lossless JPEG, those goals are fundamentally incompatible. Lossy JPEG blurs edges, and it is the edges that you need to quantify.
Basically, unless you can switch the source to a lossless image format such as PNG, then your project is probably not worth doing.
Note: if the camera supports RAW images, then those might be usable.

Image Analyst
Image Analyst le 8 Jan 2022
I see about 3 different regions. I'm not sure what is sand or water or something else. If you use drawfreehand to manually trace the boundary, then you're done. You don't need any image analysis to find that boundary because you just drew it and you now have the coordinates.
There is a function to find regional maxima : imregionalmax(). But I don't think it will do what you're hoping for.
And like Walter said, you need to use a lossless format like PNG, not JPEG with the horrible compression artifacts as you can see in your image. If you do that, it might be possible to find the boundary without doing hand tracing.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by