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

Reply
 
Thread Tools Rate Thread
  #1  
Old 15-07-2015, 02:28 PM
algwat (Alan)
Registered User

algwat is offline
 
Join Date: May 2012
Location: Melbourne, west
Posts: 286
Using ImageJ to Align images

Gidday All,

I thought to share this use of ImageJ to pre-process your images or align them and produce an set of centered images. The example I have will make an image set with a comet correctly centered in the the FOV.

You can change the output image size to make a crop from large mega pixel images.

You may find this useful to pre-process your planetary images to make the planet centered before you use your favorite commercial program to make a master image.

A PDF can be found on my Google drive here,
https://drive.google.com/file/d/0B8n...ew?usp=sharing

Let me know if you like it, and have any questions about ImageJ setup issues.

kind regards, Alan Watson
http://cometal-comets.blogspot.com.au/

check out my Pluto images on the blog....
Reply With Quote
  #2  
Old 16-07-2015, 02:19 PM
algwat (Alan)
Registered User

algwat is offline
 
Join Date: May 2012
Location: Melbourne, west
Posts: 286
Here is the text of the macro , in case you cannot cut it out of the PDF or don't want to type it in... a few minor tweaks, see the end of text.. 8)


//0000000000111111111122222222223
//0123456789012345678901234567890
//Registered 20150527-1:reference slice 3277.750 1526.250 134 1

// image size
imgsz = 1024;
//
if (nResults==0)
exit("Results table is empty ");
//
wdwnm = getResultLabel(1);
wdw = substring(wdwnm,0,21);
print (wdw);

for ( n=1 ; n<nResults-1;n++) {

posx = getResult("X", n);
posy = getResult("Y", n);


makeRectangle(posx-(imgsz/2), posy-(imgsz/2), imgsz, imgsz);
//
run("Duplicate...", " ");
//
selectWindow(wdw); // change too stack window name
//
run("Next Slice [>]");

}

run("Images to Stack", "name=Stack title=[] use");

//
selectWindow("Stack");
run("Z Project...", "projection=[Sum Slices]");
//
selectWindow("Stack");
run("Z Project...", "projection=Median");
//
selectWindow("Stack");
run("Z Project...", "projection=[Average Intensity]");
//
selectWindow("Stack");
run("Z Project...", "projection=[Max Intensity]");
//
Reply With Quote
Reply

Bookmarks


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 01:43 PM.

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