Author Topic: Batch process to create and save previews  (Read 2417 times)

Offline calan

  • Newcomer
  • Posts: 34
Batch process to create and save previews
« on: 2017 May 09 15:26:30 »
Let's say I have 10 images with a bright star in the middle. Is there a batch process method to create a preview in the lower right corner of each image, and save it to disk as a new image? (actually the same name as the parent, with an extension).

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Batch process to create and save previews
« Reply #1 on: 2017 May 09 23:38:09 »
Hi calan,

In short, 'no'. Your requirement would seem to be pretty unique, so it is unlikely that you will find an 'off the shelf' solution. That said, all is not lost - if you can create the image that you are after using a series of 'manual steps', then these steps can be recorded and re-used to process a collection of images.

The first thing that you would need to do is to re-kiad one of your 'source' images inro the PixInsight Workspace. Then you need to perform the steps needed to modify that image. Finally, you need to then save the image with a new name (of your choice).

You can then save the sequence of steps, taken from the HistoryEcplorer, as a new Process.

You can now load the umages that you wish to process, and create an ImageContainer to 'hold' them. The ImageContainer can now be processed by the new Process that you created, and all images will have all the appropriate steps applied to them.

So, that is a fairly common-place activity within PixInsight. However, you may not be able to fully define what it is you are trying to achieve - and that step is a very important, crucial, step.

Perhaps you can try explaining, in more detail, what you hope to achieve - as an ordered list of steps.
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline calan

  • Newcomer
  • Posts: 34
Re: Batch process to create and save previews
« Reply #2 on: 2017 May 09 23:55:59 »
My first thought was the image/process container approach...but I can't figure out how to "Draw" a preview on each image. I can draw it on one manually, and then drag it to another image and create the same preview... but I haven't figured out how to do it automatically and save the preview as a new file.

Here is the scenario...

I have about 150 single images of Alkaid that I took, at various gain, exposure, and white balance settings. What I want to do is create an identical preview on all of them that is just background and save it as a new image, so that I can do some comparative image analysis on all of them using the BatchStatistics script. I'll then import that csv file into Excel and add some more data manually. (Speaking of which...why can't the BatchStatistics script show values for separate color channels like the regular Statistics process?). I used Alkaid because it provides a bright object in a dark uncluttered background for dynamic range study, and crosses close to the zenith at a good time of night for me.

That's pretty much it in a nut shell.

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Batch process to create and save previews
« Reply #3 on: 2017 May 10 00:13:31 »
OK,

So - if your new image simply comprised the bottom-right quadrant (for example) of the original - would that work?

Do you need Alkaid in the new image, or not? If you do, is there a reason for not just using the entire image?

If you don't want Alkaid in the final image, then this might work:

Use ImageIntegration to (very simply) average all the image data into one new, temporary image (with no StarAlignment being done ahead of this, and without worrying about Pixel Rejection, Noise, Weighting, etc.). Now you can see where Alkaid is/was on all of the images. You can now use the Crop Process (not DynamicCrop), along with a Preview of your combined image, to create an image area that will either a.) always include Alkaid, or b.) never include Alkaid.

You don't need to actually Crop the combined image (you are about to dump that image anyway). What you do want to do is to save the Crop Process to the Workspace (or, save two Crop Processes - one with Alkaid, one without Alkaid).

Now you can use an ImageContainer along with one of these Crop processes, and create a new collection of images - with, or without Alkaid.

Is that taking you in the right direction?
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC