Giter Site home page Giter Site logo

lennart-rth / live-earth-wallpapers Goto Github PK

View Code? Open in Web Editor NEW
298.0 5.0 13.0 138.66 MB

A collection of all earth related space Images in one script to set as your Desktop background.

License: GNU General Public License v3.0

Python 94.82% Shell 2.62% Batchfile 0.03% VBScript 0.31% Inno Setup 2.22%
background-image gnome goes-satellite himawari-8 meteosat python sun sentinel-1 sentinel-2 solar

live-earth-wallpapers's Introduction

PyPI version License: GPL v3

Linux MacOs Windows

Live-Earth-Wallpapers aka liewa

Set your Desktop background to near real-time pictures of the earth. Supports all known geostationary satellites, high resolution sentinel images, Nasa Solar Dynamics Observatory images and NASA astronomy picture of the day (Apod)! For Linux, Windows and macOS!


Examples

alt text Example Output of the config1.yml file. Use this by passing config1 to -c flag. alt text Example Output of the config2.yml file. Use this by passing config2 to -c flag. alt text Example Output of the config3.yml file. Use this by passing config3 to -c flag. alt text Example Output of the Sentinel satellite. Learn how to generate custom images for your location at the Wiki Page alt text Example Output of the Sentinel satellite. Learn how to generate custom images for your location at the Wiki Page alt text Example Output of the Sentinel satellite. Learn how to generate custom images for your location at the Wiki Page alt text Example Output for astronomy picture of the day feed (apod)(2022 November 15).

Build images to your needs by writing your own config.yml file or using the GUI.

Read more on the Wiki Page.


Installation

You need Python installed and added to your System-path-variable!

Using PyPi (Linux,MacOs)

  1. Install liewa-software from pypi Package
  2. execute command line Interface by liewa-cli or the Gui by liewa-gui.

Windows

  1. Download the liewaInstaller.exe from Releases Page and execute the GUI.
  2. If the desktop image hasn't changed, take a look at the Known bugs section.

Linux

  1. Download the liewa.deb file from Releases Page.
  2. Execute sudo dpkg -i liewa.deb.

MacOS

  1. Download the liewa.dmg drive from the Releases Page.
  2. Drag and Drop the liewa software into the Program Folders.

For detailed user guide, read the Wiki page.

Usage

Script Parameters:

short long type default help
-c --config String path/to/project/recources/config.yml The absolute path to the config File. There are 3 examples preinstalled. Use them by passing congfig1, config2 or config3 as parameters.
-o --output String - The absolute path to a folder. All loaded Images will be saved here.

The composition of your background image is defined by a config.yml file.
Read the Wiki for a detailed instruction on how to personalize your image composition.


For Contributers

  1. Read the Contributing Readme.
  2. Filter discussions by "For Contributers" label to find topics to work on.
  3. Feel free to add your own ideas, features or open a discussion in the Discussions tab.

Known Bugs

  1. As of June 27, 2023, there are no images available of Goes-17 meteosat-11.

Pypi

  1. If liewa-cli or liewa-gui is not known, add python pip itepackages to system PATH.

Windows

  1. On some systems the task scheduler can't automatically be set to execute the program even when the cumputer is in battery mode. Therefore you have to uncheck this flag manually in the TaskScheduler for the liewa Task.
  2. On some systems the python Packages need to be manually installed. Do so by typing pip install bs4 pillow pyyaml requests into CMD.

live-earth-wallpapers's People

Contributors

dillwynknox avatar fauwara avatar lennart-rth avatar steffencucos avatar theborakompanioni avatar vszabo2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

live-earth-wallpapers's Issues

Sentinel ignores supplied resolution

Describe the bug
Sentinel code does not use supplied resolution when loading images from url

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
We should pass the args.width/height to the sentinel satellite url

Screenshots

def calcImageDimensions(args):
    pixelWidth = 1920
    if args.width is not None and args.height is not None:
        pixelHeight = pixelWidth / (args.width/args.height)
    else:
        pixelHeight = pixelWidth / (16/9)

    return int(pixelWidth), int(pixelHeight) # ALWAYS RETURNS 1920 WIDTH

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The args parsing for the resolution messes with zoomed in goes/himawari/meteosat satellite images

When you pass a zoom argument > 0 to goes/himawari/meteosat satellites, the args parsing code that applies the height/width will crop the (large for zoom levels > 1) image to the width/height in the args (default 1920*1080). This means most of the downloaded images will be cropped out, and the user has no control over where the crop happens.

reproduction steps:

python changeBackground.py -z 3 -s meteosat-9

See that the output image is much smaller than it should be, and that it's cropped in to mostly black

I recommend finding a way to scale the image down to the supplied resolution, rather than cropping
OR
Allow the user to pick which part of the image to zoom into (like what row column to use as the top left of the output image)

Crash to desktop

Hi, I really like the idea of your project :)

I wanted to try Liewa on Windows 11.

I installed it and added a scheduler, clicked "Test now" and after a short "Downloading" it just closes the app.

Try to remove clouds from sentinel images

The current approach to generating sentinel images is to overlay 4 days worth of images to "plug" the holes that they have (gaps in the coverage of an area for a given day). This approach creates a full image, but doesn't always leave you the "best" possible image, as the output is order dependent and doesn't account for which images have better land coverage.

I have my own approach at solving this that looks at each image on a per pixel basis and does its best to avoid using pixels from clouds.

Here is an example over Italy that showcases how much land you can recover from the images that mostly get ignored.
Left: Without clouds
Right: Current image generation
compare_smaller

Here is the source for this approach. It is by no means perfect, as you can clearly see artifacts in the water and over darker parts of land, but overall the landmass is much more visible. Also note that this approach is VERY slow atm. It's doing math, list sorting, and object generation on a per pixel basis. This can easily be parallelized though. You could work on parts of the image in parallel, then stitch them together at the end.

def fetchImage(args):
    dateWithDelay = datetime.datetime.now(datetime.timezone.utc)
    dateWithDelay = dateWithDelay-datetime.timedelta(hours=3)

    from multiprocessing.pool import ThreadPool as Pool

    def download_func(day):
        time = dateWithDelay.strftime("%Y-%m-")+str(dateWithDelay.day-day).zfill(2)+"T00:00:00Z"
        url = combineURL(args,"copernicus:daily_sentinel3ab_olci_l1_rgb_fulres",time)
        print(f"Downloading Image from {time}...\nwith URl:   {url}\n")
        img =  download(url)
        return img

    num_days = 7
    with Pool(num_days) as pool:
        imgs = pool.map(download_func, [i for i in range(1,num_days + 1)])
        
    bg = Image.new('RGB', (args.width, args.height))

    def dev(pixel):
        cols = pixel[:4]
        dev = max(cols) - min(cols)
        return dev

    def sm(pixel):
        cols = pixel[:3]
        #dev = max(cols) - min(cols)
        sm = sum(cols)
        if sm == 0:
            return 255*3
        return sm

    real_images = list(filter(lambda x : x != None, imgs))
    print("real: ", len(real_images))
    for x in range(args.width):
        for y in range(args.height):
            pixels = [img.getpixel((x,y)) for img in real_images]

            pixels.sort(key=sm)
            sum_pixel = pixels[0] # get the lowest sum (least bright)
            pixels.sort(key=dev)
            dev_pixel = pixels[-1] # get the largest dev (darkest single chanel)
            avg_pixel = (
                int((sum_pixel[0] + dev_pixel[0])/2),
                int((sum_pixel[1] + dev_pixel[1])/2),
                int((sum_pixel[2] + dev_pixel[2])/2),
                int((sum_pixel[3] + dev_pixel[3])/2),
            )
            bg.putpixel((x,y), avg_pixel)

    colorGraded = white_balance(bg)
    return colorGraded
    ```

Add image as background

Add an option to add a background image to the composition. For example a faint night sky with very dim stars.

  1. The image file should be passed as a absolute path in the config.yml file in the settings Section.
    Maybe rename bg-color to bgand make it possible to parse color hex value or image path.
    If not specified the background should still be filled with black.
    This should be done in image_parser.py line 22, where the black background is currently added.
  2. Currently the loaded satellite images are square in size. To blend in behind the background they must be clipped to a round shape.
    Maybe add a alpha layer mask with pillow to crop the black areas out. Luckily the Planet is always in the same position, but does this work for different zoom Levels too.

sentinel color grading

Sometimes the Sentinel Images are quit dark. Especially in the northern hemisphere (>30°).
There is already some color grading going on in sentinel.py:white_balance(). This needs to be replaced with a sequence of "correction steps" , to auto brighten, auto contrast and auto strech (colorspace not image size) the image. A good start would be the ImageEnhance Module from Pillow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.