Using Formulas with more than one image

Scripts and programs to automate Astroart
Post Reply
nmac
Posts: 15
Joined: 15 Jan 2019, 14:53

Using Formulas with more than one image

Post by nmac » 23 May 2024, 13:56

Hi!

is there a way to use formulas in scripts using not only the active image but several open images and for each color channels of those images?
As an example using 2 RGB images and combine both red (vr1+vr2) channels of each image and generate a new mono image with the result. I know this
can be obtained using the Arithmetic/Add/Merge menu but sometimes it would be useful and faster using scripts for sucessive and combined operations.
You can think this as scripted pixelmath.

Thanks

fabdev
Posts: 495
Joined: 03 Dec 2018, 21:43

Re: Using Formulas with more than one image

Post by fabdev » 24 May 2024, 17:20

Hi, using a Formula it's not possible, but it could be possible with other commands.
For example, the task you wrote can be done with:

1) For DSLR and OSC, with an in-memory Preprocessing, selecting "Red channel" as method in "RGB Demosaic".
2) For generic color images, with a script which extracts the Red channel (creating a new image) then selecting the other image, extracting again the Red channel and then adding the two images. To change the active image see the script commands: ImageList.Select ....
Fabio.

Post Reply