Find local maximum from jpg
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Walter Roberson
el 7 de En. de 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.
0 comentarios
Image Analyst
el 8 de En. de 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.
0 comentarios
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!