I have been creating a twitter bot to post satellite images of random coordinates and I have found that the vast majority are of the ocean, so I would like to somehow make the bot detect that the entire photo is blue and repeat the process. The bot code is available here.
Thanks in advance.
CodePudding user response:
As an alternative to employing machine vision to assess the content of the image to determine whether to sample again, you could simply sample from coordinates that are not the ocean! There are many files produced by geographers that have sought to map the boundaries of the world's continents.
For example, see here for code to do so. You'll need to understand projections and other features of Geographic Information Systems if you want to get extremely accurate.
Alternatively, here is a guide to water detection in satellite imagery using Python.