How to find a border between sky/ground on a photo?

asked 2020-05-24 05:50:41 -0500

Hello, I have the android app that capture a camera view. I want to postprocess an image from camera to modify a sky on image. I need a way to find where the sky is on an image. I need to detect a curve that splits "sky" from "ground" (everything exclude the sky).

My app is coded with Kotlin. I should be able to use OpenCV java with it.

Is there a way to do it with OpenCV? Some technology to find border of "lighter" and "darker" areas on an image? I presume the sky is always on top and i only need to find that curve that splits it from a ground

The "sky" is not just blue area. It can be with clouds or gray. But usually it is much lighter than "ground"

edit retag flag offensive close merge delete