Git Product home page Git Product logo

astrastack's Introduction

AstraStack

Astronomy Stacking application - Manual - Website

AstraStack is an easy to use application used to stack videos or images of planets, the sun, moon, deep sky objects and more. Stacking is a technique used to improve the quality of the image by aligning each frame and then averaging the best frames to create a low noise version of the image which can then be sharpened.

Get it from the Snap Store

Development Installation

To install you should first set up a virtual environment

$ virtualenv -p python3 env

Then activate the virtual environment

$ source env/bin/activate

Install required python packages with pip. You may need to first install numpy before running the requirements install if you don't have the numpy system package installed.

$ pip install numpy
$ pip install -r requirements.txt

You may need to install some additional system packages, ie: libcairo2-dev, pkg-config, python3-dev, libgirepository1.0-dev

You can run the application with

$ python AstraStack.py

Developer Instructions

There are other packages which are used for developers

$ pip install -r requirements_dev.txt

Build Instructions

Building primarily uses pyinstaller to package into an executable.

$ ./build.sh

The project can also be built in Windows using a mingw64 installation. You can install the python packages via the pacman package manager that it comes with, as well as with pip. Inno Setup is also used to create an installer file.

Testing

Testing uses the behave package and Gtk instructions are 'simulated' during testing. To run the tests run the following:

$ behave

References

  1. RegiStax - https://www.astronomie.be/registax/
  2. PyStackReg - https://pypi.org/project/pystackreg/
  3. TurboReg - http://bigwww.epfl.ch/thevenaz/turboreg/
  4. StackReg - http://bigwww.epfl.ch/thevenaz/StackReg/
  5. A Pyramid Approach to Subpixel Registration Based on Intensity - http://bigwww.epfl.ch/publications/thevenaz9801.html
  6. Image Sharpening using Unsharp Masking and Wavelet Transform - http://ijarcsms.com/docs/paper/volume2/issue6/V2I6-0003.pdf

astrastack's People

Contributors

finalfantasykid avatar orena1 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

Watchers

 avatar  avatar

astrastack's Issues

Memory Leak

There seems to be a memory leak in some environments (ie. AlmaLinux 8, which is used to build the linux binary). It seems to originate from the pixbuf for the image preview and easily replicated by rapidly scolling the frame slider and watching the memory usage rise. Maybe the pixbuf needs to be manually cleared everytime?

Add Frame Normalization

Add frame normalization so that videos with varying brightness may have better alignment results.

Add auto-crop option

Right now the images are automatically cropped based on the shifts. But it would be nice to not have it auto-crop and instead use the reference frame as a background. Drift shifts will still probably need to crop for now, but that might be able to be changed in the future as well.

Create a single executable/installer

Having users need to set up a dev environment in order to run the application is not ideal, so there needs to be an installer, or single executable to run.

Have Headless option

This has already sort of been started, it mostly already works, but there are a couple UI things which need to be removed for this to be fully functional.

Clean up cache & frames folders

Ideally the cache and frames folders should be changed maybe to some virtual filesystem or something like that. Also shouldn't have files like stacked.png and sharpened.png hanging around, those can probably just reside in memory.

Fix UI issues

Right now the UI doesn't do much in terms of validating inputs, and making sure that buttons are pushed at the right times. It should disable/enable fields depending on what step the user is on so that the program doesn't get into any fragile state.

Add option for deconvolution

First of all, this project is great - exactly what I was looking for as an open source alternative to AutoStakkert / Registax.

There's a couple of things that I think could be added in to make it more powerful, starting with an option to perform a deconvolution on the result image to address image quality issues in the telescope optics, such as imperfect focus, diffraction artifacts, or even motion blur from over-long exposures of individual frames.

OpenCV provides a pretty stright-forward example script for using cv.idft to preform a Wiener deconvolution. The simplest implementation would have the user provide an assumed PSF, likely in the form of a radius for a gaussian blur. A (much) fancier approach, which would be totally fair to declare out of scope for this project, would have the user photograph a star nearby to the planet of interest and use that image as the source for the PSF. They'd probably need to use an image stack there as well to avoid the computed PSF being mostly noise.

If you think this would be a useful addition, I may have some time to provide some help with implementation.

Get rid of tmp files

Having to read/write tmp files repeatedly adds quite a bit of overhead, and unnecessary code. No tmp files should need to be written.

Remove Pillow dependancy

Pillow is only used for the image similarity, and there shouldn't be any reason why opencv could just be used instead. Its probably increasing the size of the build.

Slow when opening videos with no index

Some programs do not include an index in the videos which can drastically slow down the program execution. A solution might be to do something like VLC does and prompt the user to build the index (this would rewrite the video file). For now you can manually build the index by running the following:

ffmpeg -i input.avi -map 0 -c copy output.avi

Allow opening an image series

Multiple images should be able to be selected so that they could be the frames being stacked instead of video frames

Add Frame Range

When during the alignment step it would be nice to be able to specify a custom start/end frame. The drift adjustment could use these as well to produce a more accurate drift adjustment.

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.