Author Topic: Pixel Math error  (Read 4803 times)

Offline Peter

  • Member
  • *
  • Posts: 57
Pixel Math error
« on: 2014 February 14 12:18:53 »
Hello everyone, following Gerald's excellent pixel  math videos and I am creating black, grey and white images as shown with the statistics to measure as per instruction. The black reads 0.000 on all measurements so that reads ok, the grey image reads average readings of 0.502? But the problem is with the statistical reading of the white image which gives 0.000, the same as the black image. If I reduce the intensity from 1 to 0.9 then the statistics read 0.900 as expected. If I got to 0.99 then the statistics revert to 0.000! Any ideas as to the reason why the whites read the same as the blacks? I use normalise 0/1, create new image, RGB or greyscale makes no difference to any of the readings of course. So any advice out there?

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Pixel Math error
« Reply #1 on: 2014 February 14 15:23:02 »
Hi Peter!
I thinks thats a bug in Statistics.
Created an image with "1"  in PixelMath. Got a white image, but
Statistics Displays 0, 0, 0 in all Areas
Readout Cursor Display 1, 1, 1 everywhere

Win 7, PI 1.8 - 1087

Gerald
« Last Edit: 2014 February 14 15:28:09 by oldwexi »

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Pixel Math error
« Reply #2 on: 2014 February 15 01:34:38 »
I think that some tools ignore pixels very close to zero or 1 (because they contain no useful information). Maybe Statistics is one of them.
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Peter

  • Member
  • *
  • Posts: 57
Re: Pixel Math error
« Reply #3 on: 2014 February 24 08:12:50 »
Thank Georg and Gerald I can always count on sound and explanatory comments from both of you, my thanks to you bo :D :D :D :Dth

Offline silentrunning

  • Newcomer
  • Posts: 30
Re: Pixel Math error
« Reply #4 on: 2014 October 18 08:29:44 »
I get this same problem.

I'm following Gerald's tutorial on PixelMath Basic Functions and statistics displays a pure white image as having pixel values of 0 rather than 1 though it works for him in his tutorial. Is this bug being addressed, as a beginner with PI it completely confused me and this thread was started sometime ago.

Many thanks

Doug

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Pixel Math error
« Reply #5 on: 2014 October 18 11:53:14 »
Hi Doug!
This bug is still existent.

But, if you enter in PixelMath instead of    1   the expression
1 - 0.00001
you get also a white image but Statistics now displays the values correctly

Using the ReadoutCursor shows in any case the correct values.
No need to be confused.

Gerald

Offline silentrunning

  • Newcomer
  • Posts: 30
Re: Pixel Math error
« Reply #6 on: 2014 October 19 01:43:43 »
Many thanks Gerald.

Any particular reason why it hasn't been fixed, seems like an easier enough thing to do. How come it works in your tutorial?

Doug

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Pixel Math error
« Reply #7 on: 2014 October 19 02:29:14 »
Hi,
assume in 1.7 it did not exist.
However it not an error in PixelMath PI 1.8
it is an issue in statistics PI 1.8.

Gerald

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Pixel Math error
« Reply #8 on: 2014 October 21 08:01:44 »
Hi,

the Statistics module seems to ignore 0 and 1 pixel values. However this is an annoying feature because the PJSR Image methods like Image.mean() do not ignore these pixels like Pixelmath. At least it should be possible to set some constraint (upper lower values) when computing statistics with PJSR and Pixelmath.

Kai


 

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Pixel Math error
« Reply #9 on: 2014 October 21 09:04:01 »
Kai!
I think it has nothing todo with PixelMath.
ANY process which produces a white Image creates 1.0 in the Pixel value (as also PixelMath does)
The readout Cursor than shows 1.0, so the data are o.k.  !

ONLY the STATISTICS Process in PI 1.8 displays the Pixel Values WRONG, despite the correct data!

You can work with PixelMath and other processes afterwards they calculate on the base of 1.0 very precise
and correct.

Gerald

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Pixel Math error
« Reply #10 on: 2014 October 22 08:00:09 »
Gerald,

sorry, this was a typo.

the Statistics module seems to ignore 0 and 1 pixel values. However this is an annoying feature because the PJSR Image methods like Image.mean() do not ignore these pixels like Pixelmath Statistics module. At least it should be possible to set some constraint (upper lower values) when computing statistics with PJSR and Pixelmath.

The Statistic module ignores 0 and 1 pixels. However all processes within PI should give the same result. So it would be nice, if for example the PJSR Image functions like Image.mean() and the Pixelmath mean() function get this capability too (with a simple boolean switch added for example)

Kai