lennart-rth / live-earth-wallpapers Goto Github PK
View Code? Open in Web Editor NEWA collection of all earth related space Images in one script to set as your Desktop background.
License: GNU General Public License v3.0
A collection of all earth related space Images in one script to set as your Desktop background.
License: GNU General Public License v3.0
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.
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)
But you cant use the DEMO_KEY from there API.
Probably webscarpe the image from the website
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.
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
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
```
Describe the bug
Sentinel code does not use supplied resolution when loading images from url
To Reproduce
Steps to reproduce the behavior:
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):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Add an option to add a background image to the composition. For example a faint night sky with very dim stars.
config.yml
file in the settings
Section.bg-color
to bg
and make it possible to parse color hex value or image path.image_parser.py
line 22, where the black background is currently added.It says "Could not download Image 'https://rammb-slider.cira.colostate.edu/data/imagery/2022/11/05/goes-17---full_disk/natural_color/20221104122032/03/000_000.png'"
Other sources are working for me.
Specific command and full output is here.
Windows Defender discovered a Trojan in Liewa\app.exe
Report
https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?name=Trojan%3aScript%2fSabsik.TE.A!ml&threatid=2147780197
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.