What I meant by this question (apart of what my real research paradigm is).
Is suppose you get one good b/w photo of the eagle, and then you shoot a bunch on your tripod say 50 in repetitive mode. You do not want just the eagle, but roughly the same picture scene with the eagle....say you want to average the good ones. You use the good key image 1 of the eagle, to somehow compare the other images and give them a score. Some will be offset, so that is easy, and some will be in focus behind the eagle or in front of the eagle and may look different. Q1: Now what I have tried and it sort of worked was Image Calculator (Difference,) (although I struggled) with writing the batch version of this to operate each frame in a stack with one comparison key image picture. Then maybe take the average of the image brightness level as the score? Q2:How do I get the offset score of the key image 1 from stackreg? -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello Ethan,
I still don't grasp the task. "[...] then you shoot a bunch on your tripod say 50 in repetitive mode." "Some will be offset, so that is easy, and some will be in focus behind the eagle or in front of the eagle and may look different." How comes that the optical focus change? What do you mean by offset (the camera is stable on a tripod)? Is it that the bird moves? "[...] say you want to average the good ones." Why do you want to average images? Do you take them in dim light or near darkness? If you have images that represent something like a focus series, you can search for the best focused one. If this is of interest, please let me know because there exist several plugins for this task. If the bird moves and you like to stabilize its position, the rest of the image will move. Does this matter? Regards Herbie ::::::::::::::::::::::::::::::::::::::::: Ethan Cohen wrote > What I meant by this question (apart of what my real research paradigm > is). > > Is suppose you get one good b/w photo of the eagle, and then you shoot a > bunch on your tripod say 50 in repetitive mode. > You do not want just the eagle, but roughly the same picture scene with > the eagle....say you want to average the good ones. > > You use the good key image 1 of the eagle, to somehow compare the other > images and give them a score. Some will be offset, so that is easy, and > some will be in focus behind the eagle or in front of the eagle and may > look different. > > Q1: Now what I have tried and it sort of worked was Image Calculator > (Difference,) (although I struggled) with writing the batch version of > this to operate each frame in a stack with one comparison key image > picture. > > Then maybe take the average of the image brightness level as the score? > > Q2:How do I get the offset score of the key image 1 from stackreg? > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Ethan Cohen
Herbie: Thanks for the reply.
I will try to make my question as simple as possible. 1. I have a key image b/w/scene (not just the eagle) in image1. Say it is the ImageJ "Boats" sample image. 2. Now I take a series of images of the boats at low tide, with a low f-stop, but the camera jiggles, and I use StackReg (or an equivalent) to align them. The boats do not move, but the camera is not stable. Q1: How do I get the x,y offset translation value out of the best alignment by StackReg for each of the Boats frame (or one of the many registration routines in FIJI)? What is the command? Now some images will also be out of alignment in the Z with the key image. Maybe the Image Calculator "Difference" function will work. But it seems to compare 2 stacks, but not 1 image and a stack, or maybe I missed something. Q2: Can image calculator compare a single key image to each image in a stack. What is the macro code for this? I suppose I could take the single key image, and make a stack of itself, but maybe there is a better macro code way I have missed. Be well everybody, Ethan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good day Ethan!
re: Q1 I have no experience with image registration but if you are sure that the images differ essentially in x,y then I would correlate the images with the reference image. The position of the maximum of the resulting cross-correlation functions gives you the offsets. I'm sure that at least some of the registration plugins output the offsets as well. Did you try other plugins than StackReg? re: Q2 "Maybe the Image Calculator "Difference" function will work." What for? Do you want to get an estimate of the z-distance from the image-blur? This requires the precise knowledge of the camera optics. In general the f-number is not sufficient, especially if the f-number is small. You can always extract images from a stack. What do you want to do with the resulting difference-images? Regards and stay healthy Herbie ::::::::::::::::::::::::::::::::::::::::: Ethan Cohen wrote > Herbie: Thanks for the reply. > > I will try to make my question as simple as possible. > > 1. I have a key image b/w/scene (not just the eagle) in image1. Say it is > the ImageJ "Boats" sample image. > 2. Now I take a series of images of the boats at low tide, with a low > f-stop, but the camera jiggles, and I use StackReg (or an equivalent) to > align them. The boats do not move, but the camera is not stable. > > Q1: How do I get the x,y offset translation value out of the best > alignment by StackReg for each of the Boats frame (or one of the many > registration routines in FIJI)? What is the command? > > Now some images will also be out of alignment in the Z with the key image. > Maybe the Image Calculator "Difference" function will work. But it seems > to compare 2 stacks, but not 1 image and a stack, or maybe I missed > something. > > Q2: Can image calculator compare a single key image to each image in a > stack. What is the macro code for this? > > I suppose I could take the single key image, and make a stack of itself, > but maybe there is a better macro code way I have missed. > > Be well everybody, > > Ethan > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Ethan Cohen
Hi Ethan,
to me it looks like what you intend to do is what astronomers call "lucky imaging"; there is a lot of specialized software for this. Huge efforts have gone into development of these; it's nothing that one could do with an ImageJ macro in reasonable time. These programs roughly do the following: - aligning - if desired undistorting to best fit the template/the average of the best (which probably also can do some rotation; not sure about this; in astronomy it is used to correct for varying lenses formed by warm and cold air) - select images that are (i) sharpest and (ii) best fit the template/the average of the good images (can be an iterative process) - obtain average these images One program of this class that comes into my mind is Autostakkert. Michael ________________________________________________________________________ On 25/03/2020 5:50 pm, Ethan Cohen wrote: > Herbie: Thanks for the reply. > > I will try to make my question as simple as possible. > > 1. I have a key image b/w/scene (not just the eagle) in image1. Say it is the ImageJ "Boats" sample image. > 2. Now I take a series of images of the boats at low tide, with a low f-stop, but the camera jiggles, and I use StackReg (or an equivalent) to align them. The boats do not move, but the camera is not stable. > > Q1: How do I get the x,y offset translation value out of the best alignment by StackReg for each of the Boats frame (or one of the many registration routines in FIJI)? What is the command? > > Now some images will also be out of alignment in the Z with the key image. Maybe the Image Calculator "Difference" function will work. But it seems to compare 2 stacks, but not 1 image and a stack, or maybe I missed something. > > Q2: Can image calculator compare a single key image to each image in a stack. What is the macro code for this? > > I suppose I could take the single key image, and make a stack of itself, but maybe there is a better macro code way I have missed. > > Be well everybody, > > Ethan > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Ethan Cohen
While we will look into autostackert, would somebody be so kind as to just answer these 2 questions?
Q1: How do I get the x,y offset translation values out of the best alignment by StackReg for each of the Boats frame (or one of the many registration routines in FIJI)? What is the command? Now some images will also be out of alignment in the Z with the key image. Maybe the Image Calculator "Difference" function will work. But it seems to compare 2 stacks, but not 1 image and a stack, or maybe I missed something. Q2: Can image calculator compare (i.e. Difference) a single key image to each image in a stack.? What is the macro code for this? Thanks, Ethan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Ethan,
For your question Q1, I indeed have (i.e. rather had) versions of StackReg and JavaSIFT that will be outputing the "x,y offset translation values" as you wish. Thus would you only interested in the stackReg plugin or just should I try to dig up both codes? At last, don't throw stones on me in the case I can't fulfill my proposition since I'm not anymore using these codes since more than 6-8 years from now... Also should I make these codes available for the community or only for you in private? My best regards, Philippe Philippe CARL Laboratoire de Bioimagerie et Pathologies UMR 7021 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 42 89 ----- Mail original ----- De: "Ethan Cohen" <[hidden email]> À: "imagej" <[hidden email]> Envoyé: Mercredi 25 Mars 2020 22:11:45 Objet: Re: Scoring images While we will look into autostackert, would somebody be so kind as to just answer these 2 questions? Q1: How do I get the x,y offset translation values out of the best alignment by StackReg for each of the Boats frame (or one of the many registration routines in FIJI)? What is the command? Now some images will also be out of alignment in the Z with the key image. Maybe the Image Calculator "Difference" function will work. But it seems to compare 2 stacks, but not 1 image and a stack, or maybe I missed something. Q2: Can image calculator compare (i.e. Difference) a single key image to each image in a stack.? What is the macro code for this? Thanks, Ethan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Ethan Cohen
Hi Ethan,
Maybe the Image Stabilizer stack registration tool by Kang Li would be useful (https://imagej.net/Image_Stabilizer). There is a plugin for registration and another for applying the transformation coefficients to another stack. Cheers, Mark -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by CARL Philippe (LBP)
Dear Ethan and others,
Please find under the following links: http://punias.free.fr/ImageJ/Translation_Alignment.java http://punias.free.fr/ImageJ/Translation_Alignment.class a plugin where I had written the following comments: Translation_Alignment plugin corresponding to a modification of the StackReg_ plugin described lower. This plugin uses only the "translation transformation" of the StackReg_ plugin and applies as well a croping of the outside part of the shifted pictures. The plugin able to get the translation values of the transformation through the macro functions: Ext.getShiftValueX1 Ext.getShiftValueX2 Ext.getShiftValueY1 Ext.getShiftValueY2 Ext.getShiftValueX Ext.getShiftValueY As you can see, I had formatted this plugin ad hoc for my needs at that moment. I guess that you are not really interested by the "as well a croping of the outside part of the shifted pictures" feature, isn't it? In this case I can get rid of it. Nevertheless the plugin is obviously only a sub-unit of the StackReg plugin. Thus could it fulfill your application needs? Take care, Philippe ----- Le 25 Mar 20, à 23:03, CARL Philippe, LBP [hidden email] a écrit : Dear Ethan, For your question Q1, I indeed have (i.e. rather had) versions of StackReg and JavaSIFT that will be outputing the "x,y offset translation values" as you wish. Thus would you only interested in the stackReg plugin or just should I try to dig up both codes? At last, don't throw stones on me in the case I can't fulfill my proposition since I'm not anymore using these codes since more than 6-8 years from now... Also should I make these codes available for the community or only for you in private? My best regards, Philippe Philippe CARL Laboratoire de Bioimagerie et Pathologies UMR 7021 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 42 89 ----- Mail original ----- De: "Ethan Cohen" <[hidden email]> À: "imagej" <[hidden email]> Envoyé: Mercredi 25 Mars 2020 22:11:45 Objet: Re: Scoring images While we will look into autostackert, would somebody be so kind as to just answer these 2 questions? Q1: How do I get the x,y offset translation values out of the best alignment by StackReg for each of the Boats frame (or one of the many registration routines in FIJI)? What is the command? Now some images will also be out of alignment in the Z with the key image. Maybe the Image Calculator "Difference" function will work. But it seems to compare 2 stacks, but not 1 image and a stack, or maybe I missed something. Q2: Can image calculator compare (i.e. Difference) a single key image to each image in a stack.? What is the macro code for this? Thanks, Ethan -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Ethan Cohen
Good day Ethan,
re Q1: This discussion may help: <https://forum.image.sc/t/stackreg-transformation-matrix-output/29717> Regards Herbie ::::::::::::::::::::::::::::::::::::::::: Ethan Cohen wrote > While we will look into autostackert, would somebody be so kind as to just > answer these 2 questions? > > Q1: How do I get the x,y offset translation values out of the best > alignment by StackReg for each of the Boats frame (or one of the many > registration routines in FIJI)? What is the command? > > Now some images will also be out of alignment in the Z with the key image. > Maybe the Image Calculator "Difference" function will work. But it seems > to compare 2 stacks, but not 1 image and a stack, or maybe I missed > something. > > Q2: Can image calculator compare (i.e. Difference) a single key image to > each image in a stack.? What is the macro code for this? > > Thanks, > > Ethan > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |