Go Back   IceInSpace > Equipment > Software and Computers
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread
  #1  
Old 29-09-2017, 05:45 AM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
AstroImageJ astrophoto editing tool tutorial

I don't think I have posted this information about the tool AstroImageJ earlier at IceInSpace.


I repeat the first part from another thread I wrote earlier and then the update I have done these days:


Introduction:
I have many years looked for a image processing tool where I can develop my own functions. I have done that many years ago in Matlab, but Matlab is very expensive and not perfect for this.

Now I have take a look at ImageJ and AstroImageJ what can be done, it looks very simple but don't be fooled, there is a lot of power behind. I found it interesting and have started to make macros to download DSLR camera files like my Canon CR2 files.

I have a tutorial on my homepage how to start whit AIJ, you find my macros to download there too:
http://astrofriend.eu/astronomy/tuto...roduction.html

I hope you find it exiting as I do!


Update:
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:
http://astrofriend.eu/astronomy/tuto...wn-macros.html

I have also updated the text in different places.

/Lars
Reply With Quote
  #2  
Old 29-09-2017, 06:28 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,940
Reply With Quote
  #3  
Old 01-10-2017, 09:41 AM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
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/tuto...wn-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
Reply With Quote
  #4  
Old 04-10-2017, 08:00 AM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
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.

With a high quality telescope and short focal lengts you get under sampled images but at the same time you get wide field photos. With Drizzle function or simular you can still get high resolution after a lot of computing. It take a decent computer and lot of other things. Anyway it's very interesting.

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, so why not?

Plugins to ImageJ should also work in AstroImageJ.

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

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/tuto...esolution.html


Impressed? YES!

/Lars
Reply With Quote
  #5  
Old 10-02-2020, 11:45 PM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
Hi,
It was long time ago since I updated my macros I use to pre process my Canon .CR2 raw format files. I have started to rewrite it and make it more user friendly, from very uggly to only uggly user inter face :-) . I also added more functions to make it more practical to use. It will also be possible to batch read Nikon and Sony raw files, with a little extra line of code whatever camera you have as long DCRaw can read them. I have only seen this over scan region on Canon raw files, if not in the raw file you can disable the reading of the over scan region. I will post the new macro on my homepage soon.

But until then I have made a small test tool, "Frame Selection test". With that tool you can test your camera's raw file if it has an over scan region which I use in my Canon raw files to do a bias and dark calibration without any dark and bias files.

The over scan region width on my three different Canon cameras are:

Canon 350D, column width = 42 pixels
Canon 5D (Mk I), column width = 90 pixels
Canon 6D, column width = 72 pixels

It's placed on the left side. There is also an over scan region on top of the image, but I don't use that.

To make my macro work with all my Canon camera raw files I have set the reading of the over scan region from column 5 to column 32. And the rows with a margin at top and bottom of 10 pixels.

I will come back with an update of my tutorial as soon the new version of my macro is functioning.

Here at the middle of the page you can download my "Frame Selection test" tool:
http://www.astrofriend.eu/astronomy/...wn-macros.html

There are comments in the file how to use it.

Note:
You use it on your own risk, back up your files before using it !

/Lars

Last edited by Astrofriend; 11-02-2020 at 12:09 AM.
Reply With Quote
  #6  
Old 12-02-2020, 09:02 PM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
One more macro in a new version. See it as a lite version of the "big" version I am working on.

It has the name "Open DSLR raw files and convert to Tiff 16 bit", you find it here in the middle of the page:

http://www.astrofriend.eu/astronomy/...wn-macros.html

What I have done is to add a menu from where you choose which raw format you want to convert to Tiff format. You can also add the option to read the overscan areas of the sensor if it has it. Maybe only Canon.

I think this can open all DSLR cameras raw files, at least as long DCRaw can read them. I have included the most common, Canon .cr2, Canon .cr3, Nikon .nef, Sony .arw.

It's easy to add more raw files extension.

Open the macro in Notepad and add some extra rows with your raw files extensions. Don't forget to change newArray(X) to correspond to how many rows you have.

fileformatDef = newArray(4);
fileformatDef[0] = ".cr2"; // Canon RAW
fileformatDef[1] = ".cr3"; // Canon RAW
fileformatDef[2] = ".nef"; // Nikon RAW
fileformatDef[3] = ".arw"; // Sony RAW

If you use it a lot I can add some extra raw formats and they will be there in future updates. Let me know but I can't test the files, you have to do it and let me know if it works.

You download and use the macro at your own risk ! Backup your files before !

/Lars

Last edited by Astrofriend; 12-02-2020 at 09:13 PM.
Reply With Quote
  #7  
Old 13-02-2020, 06:25 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,940
Lars,

Thank you, this will be be very useful for me and my future work :-)

And I have a lots of plans - most likely I am going into retirement very soon - the company I worked for collapsed so all of us (35) were fired in January....
Reply With Quote
  #8  
Old 13-02-2020, 08:12 PM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
Hi Bojan,
That was sad to hear, but maybe your future will be very rich in enjoyment with astronomy.

I have added more raw formats:

fileformatDef = newArray(9);
fileformatDef[0] = ".cr2"; // Canon RAW tested on 350D, 5D, 6D works with overscan
fileformatDef[1] = ".cr3"; // Canon RAW not tested
fileformatDef[2] = ".nef"; // Nikon RAW tested on some, no overscan
fileformatDef[3] = ".arw"; // Sony RAW tested on some, no overscan
fileformatDef[4] = ".pef"; // Pentax RAW not tested
fileformatDef[5] = ".rw2"; // Panasonic RAW not tested
fileformatDef[6] = ".orf"; // Olympus RAW not tested
fileformatDef[7] = ".raf"; // Fuji RAW not tested
fileformatDef[8] = ".dng"; // Adobe RAW open standard, not tested

If any use some of that cameras for astrphoto, let me know if it opens the raw files correct.

Note:
You must have AstroImageJ installed, instructions here:
http://www.astrofriend.eu/astronomy/...roduction.html

And my macro above can be downloaded here:
http://www.astrofriend.eu/astronomy/...wn-macros.html

In the middle of the page.

If your camera (not Canon) has an overscan region on the sensors as Canon have it could be used when calibrating, no bias or dark images needed. But you must take your images with dithering technique. It's a kind of cheat, but if the camera has a low pattern it work, at least in my case. And if your mount track bad maybe there is no need of dithering. I have tested on my old photos from the time when I didn't use dithering, it works in most cases.

No need of bias and dark means you don't have to do this boring and time consuming work. And no wear of the camera shutter.

You can download my macro "Frame selection test" to see if the senor has this overscan area. Down load from the same place as the other.


Very busy now to get the "big" version of the macro to work, almost there.

/Lars
Reply With Quote
  #9  
Old 19-02-2020, 02:46 AM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
At last I can upload my new macro. It took me tottaly a month to rewrite all codes behind and do a lot of test. Now it work much better and it's faster. But the main thing, there are menus to set up the parameters from. It is a dream to use now compare how it was earlier. It's also more motivated to add more functions now when there is a better over view and easier handling.

I have added stacking processes for 'normal' cameras without over scan areas. Use it to convert your raw files to TIFF which AstroImageJ can read. There is already a function to precalibrate images in AIJ, you find it at the button 'DP'. I have not used it very much because I want to use the possibilities my cameras over scan area gives me.

It's a very early Beta version, but I have tested most of the functions and now after two weeks of work it looks to work correct.

I have also updated my tutorial, the pages 3 to 5 are totally rewritten:
http://www.astrofriend.eu/astronomy/...roduction.html

After I have used it and tested more I will develop some new functions.

If you test it, especially with some other camera than Canon, let me know how it works for you.

Don't forget to update the DCRaw if you have a later camera. This is separated from AIJ and works separate, but it's stored in the AIJ directory.

At least it was some good with the bad wheater, I got time to fix this !

/Lars
Reply With Quote
  #10  
Old 19-02-2020, 05:42 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,940
Reply With Quote
  #11  
Old 24-02-2020, 01:04 AM
Astrofriend's Avatar
Astrofriend (Lars)
Registered User

Astrofriend is offline
 
Join Date: Aug 2017
Location: Stockholm, Sweden
Posts: 443
I have added a function to stack aligned images semiautomatic. Good because you do this often.

Last version at bottom of page:

http://www.astrofriend.eu/astronomy/...wn-macros.html

No tutorial written to this new function yet, but it's easy to use. Also take a look at the tutorial with manually stacking which is what this function do behind:

http://www.astrofriend.eu/astronomy/...ect-files.html

There are more things going on here with help of a friend, plugin based on JAVA code.

/Lars
Reply With Quote
Reply

Bookmarks

Tags
align, astroimagej, image editing, stack, stacking


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 06:55 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Advertisement
Testar
Advertisement
Bintel
Advertisement