Find local maximum from jpg

조회 수: 2 (최근 30일)
Siegmund Nuyts
Siegmund Nuyts 2022년 1월 7일
답변: Image Analyst 2022년 1월 8일
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
yanqi liu
yanqi liu 2022년 1월 8일
yes,sir,may i ask what is target?get the water edge and compare?
Siegmund Nuyts
Siegmund Nuyts 2022년 1월 8일
Yes, ideally the individual peaks of the water edge in order to then compare (max, min, mean, ...)

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
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.

Image Analyst
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.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by