Find local maximum from jpg
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Walter Roberson
2022 年 1 月 7 日
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 件のコメント
Image Analyst
2022 年 1 月 8 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!