Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

  • Announcements

    sgl_imaging_challenge_banner_lunar.thumb.jpg.ef4882eb5fb3610f8a68e5e6913de0e3.jpg

Recommended Posts

Astrofriend    79

Now it's summer and no dark nights for us here in the north, what to do?

Many many years ago I wrote my own functions in Matlab to do astrophoto processing. Now I want to do that again, but Matlab is very expensive so I need some other tool. I have found ImageJ and the more specialized version AstroImageJ (AIJ) let me do this. You can do your own plugins with Java programming or use the built in functions with macros, the later is what I do now in the beginning.

AIJ is a multiplatform image tool and handle 32 bit floating point. There are a lot of plugins to download. And it's free !

I have a Canon DSLR camera and AIJ does not open its raw CR2 files direct, but there is a wraparound plugin to DCRAW. Works fine but only opens files one by one. I'm now buliding macros to batchload these raw files and do other things. I have started a tutorial about this AstroImageJ software and later I will place my macros there to download. If you want to try them, have a backup of all your files if anything goes wrong, I'm in the begiining of this.

 

Here is my AstroImageJ tutorial:

http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej/tutorial-aij-01-introduction.html

There are links how to download, install and  other things. It will come more later.

Lars

  • Like 3

Share this post


Link to post
Share on other sites
Astrofriend    79

Now I have the first two macros to AstroImageJ, AIJ ready to test.

First macro convert your Canon CR2 raw subflat files to demosaiced calibrated rggb master flats.

Second macro convert your Canon CR2 subobject files to calibrated and demosaiced rggb files.

There is no need for any bais and dark, it take information from Canon's overscan region. It give perfect temperature match because the dark/bias and object comes from the same image. I have tested on Canon EOS 350D, 5D and 6D.

It doesn't dark/bias calibrate pixel by pixel, it subtract an average value, that's mean that you have to take your object files by dithering method to get rid of static pattern.

Here you find my macros and a short tutorial, download on page 3.
http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej/tutorial-aij-01-introduction.html

This is my first macros for AstroImageJ so expect them to have bugs. Have backup of you files! You use it on your own risk!

The files you get as a result you handle like files from a monocrome camera with rgb filters. There are two green images, green1 and green2, you must align them not just add.

Later when I get a free time I will explain how to align and stack them in AIJ, this function are already built in AstroImageJ, as an alternative you can use your favorite astro edit program to align and stack.

Hope you find it interesting.

/Lars

Edited by Astrofriend

Share this post


Link to post
Share on other sites
Astrofriend    79

Hi Michael,

Yes give it a try, I'm very exited about this software. Now I can process astrodata with my own functions as I did in Matlab 20 years ago. AstroImageJ is almost exactly as ImageJ, just some small changes and a lot of astro editing plugins are included in the installationpack. Did you use ImageJ to do astroediting or did you process other kind of images?

 

/Lars

Share this post


Link to post
Share on other sites
Astrofriend    79

I have now added a new part to the AstroImageJ tutorial.

This is one method how to align the images, there are others methods too, maybe better:
http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej/tutorial-aij-06-align-rggb-files.html

One big advantage of how it aligns is that it align the demosaiced images, each separate color relative the others. Optics with chromatic problems will look better.

/Lars

Edited by Astrofriend

Share this post


Link to post
Share on other sites
Uranium235    5,970

Ive been using AIJ for a while to WCS solve and annotate images via SIMBAD, its only downfall is that you have to save the image off in chunks (if its large) and stitch them back together in order to keep the object labels uncluttered. This image had to be saved off in 24 chunks before stitching back together with ICE:

26527830040_37fac692bf_h.jpg

If you could write a function that would avoid me having to save off in so many bits, that would be incredibly useful for a lot of people as it would provide a free alternative to much more expensive options like PI.

Share this post


Link to post
Share on other sites
Astrofriend    79

Hi Uranium,

How many Mpixel are your files and how many bits per pixel? Do you run on a Windows 64 operation system? Or did you mean that's it's only that the labels get to big on big images?

 

My files are 20Mpix (Canon EOS 6D) and I can have more than thirty open at the same time without having them as a virtual stack. My system is Windows 10, 64 and I have 8GByte of RAM. I havn't tested the annote function yet, much to learn to understand all possibilities of AIJ.

/Lars

Share this post


Link to post
Share on other sites
Uranium235    5,970
3 hours ago, Astrofriend said:

Hi Uranium,

How many Mpixel are your files and how many bits per pixel? Do you run on a Windows 64 operation system? Or did you mean that's it's only that the labels get to big on big images?

 

My files are 20Mpix (Canon EOS 6D) and I can have more than thirty open at the same time without having them as a virtual stack. My system is Windows 10, 64 and I have 8GByte of RAM. I havn't tested the annote function yet, much to learn to understand all possibilities of AIJ.

/Lars

Thanks for taking a look at this. The above image is just under 9MP (8300 camera, which is 16bit), but ive used it on images that are ~60MP+ (3x3 mosaic), and Im using the 64bit version of AIJ.

When you zoom out to view the whole image, the labels remain the same size (and so look too big). Whats needed is a way to save it all off as a TIFF (or id be happy with a jpg), while keeping the object labels the same size as they would look when the image is viewed at pixel scale (100%). ie: the lable font size needs to scale in relation to the image zoom setting, so if you zoom out to something like 20% - the text follows suit and becomes quite small. Or alternitavely, when using the option to save the current view - instead of saving just what is displayed, it also saves was isnt currently being rendered (the rest of the image, plus its overlay).

I'll take a look at the overlay options next time im at the PC.

Share this post


Link to post
Share on other sites
Astrofriend    79

Now I have finished the last important step in my tutorial: How to stack the sub images.

It's a little bit different compare how it's done normally.

Here is my homepage with my tutorial:

http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej/tutorial-aij-07-stack-object-files.html

Now the fun starts, if you have a Canon EOS camera it should work. You don't have to take darks or bias images if your camera is of late low noise type. Or I will say in my case, maybe there are some situations where it's not working. I have also done some tests on my old Canon EOS 5D files, it looks like it works pretty well with these noisy images too, but could had been even better if I had taken those old images with dithering technique.

 

/Lars

 

  • Like 1

Share this post


Link to post
Share on other sites
Astrofriend    79

Now I have started next step on the develop of a new macro/function to AstroImageJ (AIJ).

This will be a Drizzle align tool. I'm not shure if this will work but I will do an attempt to do it. I have started to collect the mathematical tools that's needed to do this and you can follow it on my homepage if you find it interesting:

http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej-align-drizzle/tutorial-aij-align-introduction-matrix.html

With a Drizzle tool you can get back the resolution you have lost by undersampled images, i.e. high resolution telescope and big size pixels. Google on NASA and Drizzle and you will se how they develop this method for Hubble Space telescope.

This is much about matrices and one problem is that AIJ doesn't handle matrices as Matlab do. I have to find a solution to this, nestled loops and other things.

/Lars

Edited by Astrofriend

Share this post


Link to post
Share on other sites
Astrofriend    79

Today it was a bad weather and I spent the day to collect more information how to do develop the Drizzle function and also wrote some examples how different number of reference points (stars) in the align procedur affect the stacked image.

If you find it interesting to read more, visit my homepage:
http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej-align-drizzle/tutorial-aij-align-introduction-matrix.html

/Lars

Share this post


Link to post
Share on other sites
Astrofriend    79
Hi,
I have done a small but significant update in my macro to the AstroImageJ editing software.

Earlier when creating files after the demosaicing process they very ordered in color order. That caused problem later when try to align comet images or images that moves because of bad polar align. Now the filenames creates so that they will sort by the time when they were taken. Hence just small movements between each image to be align. You can still have the old filename order, just set a parameter in the macro file.

This is important in this case because I'm not only align rgb images, I do demosaic rgb images and then them align r, g and b images against each other. This reduce the color aberation from lens optics and atmospheric aberration.

You find the new macro here to download and instrcuction how to used it:

Share this post


Link to post
Share on other sites
Astrofriend    79

I did a new complement in the AIJ macro "Calibrated_object files from CR2 files", a flag that let the flat calibration to be on or off.

But the big new is that there is a new macro.
The: "Open_DSLR raw files and convert to cfa Tiff 16 bit" (Beta)

http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej/tutorial-aij-03-my-own-macros.html
All my three macros are included.

With that I hope you can open your files in AstroImageJ whatever DSRL camera you have. If DCRaw can handle the cameras raw file it should work. It opens in batch mode, you don't have to open the files one by one.

It opens raw files, and convert to cfa Tiff 16-bit and store under map CFA.

I have tested Nikon D3 nef files and Sony A7RII arw files. It looks to work.

Note:
You must edit the parameter to the filetype in the macro to your specific camera.

Let me know if you if you try this with a non Canon camera.

/Lars

Share this post


Link to post
Share on other sites
Astrofriend    79

These days I have done a Quantum Leap in my progress to have a tool that can give back lost resolution from under sampled images.

 

I tested a plugin that is developed to ImageJ and ImageJ is dedicated to the microscopic world. I didn't think this should work. But cells are a bit galaxy shaped, why not?

 

Plugins to ImageJ should also work in AstroImageJ.

 

I wrote to the developer of Parallel Super-Resolution plugin Piotr.

 

If you find it interesting you can read here what he answered and what I got from my simple test on undersampled M13 images.
http://astrofriend.eu/astronomy/tutorials/tutorial-astroimagej-align-drizzle/tutorial-aij-align-parallel-super-resolution.html

 

Impressed? YES!

 

/Lars

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

×