Author Topic: Combining 2 RGB images in PI?  (Read 4152 times)

Offline dlp

  • Newcomer
  • Posts: 17
Combining 2 RGB images in PI?
« on: 2011 January 13 12:10:42 »
I had a go at combining 2 images using PixelMath as per Juan's posting - http://pixinsight.com/forum/index.php?topic=1303.0

I guess that was aimed at non-RGB images, but in any case my expression (snB=nB*AvgDev(A)/AvgDev(B); A/nA/nA + B/snB/snB) fails 'Parse Error: Expected lvalue operand'.

I wonder if anyone could say what the correct expression should be, and how I input RGB noise SD into 'Symbols' ? (I used just the figure for the red channel in my test)

Many thanks for a wonderful product btw.

David

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Combining 2 RGB images in PI?
« Reply #1 on: 2011 January 14 08:16:25 »
Hi David,

snB = nB*AvgDev(A)/AvgDev(B);
A/nA/nA + B/snB/snB


Your expression is correct, except that you must declare snB as a variable. That's what the 'expected lvalue operand' error means: an lvalue is a left-hand value, or in plain words, something that can appear at the left side of an assignment operator.

Just write snB in PixelMath's 'Symbols' slot and all will be fine, syntactically speaking ;)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline dlp

  • Newcomer
  • Posts: 17
Re: Combining 2 RGB images in PI?
« Reply #2 on: 2011 January 14 12:16:44 »
Thanks Juan - don't know what I did the first time, but I re-entered the equations and it processed fine. However, it produced a completely white image (see below), which a STF just made grey. Can you advise further please?

Edit: Juan - ignore this* - I forgot to tick the 'rescale image' option! I'll leave the post here for others' benefit, unless you want to remove it


David


* PS how should I average the noise for the 3 channels - is it just a simple average
« Last Edit: 2011 January 14 12:27:44 by dlp »

Offline dlp

  • Newcomer
  • Posts: 17
Re: Combining 2 RGB images in PI?
« Reply #3 on: 2011 January 16 07:56:05 »
Juan - could you possibly answer the noise average question? - guess you may have read the post before I edited it.