Author Topic: CurvesTransformation Artifacting  (Read 3013 times)

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
CurvesTransformation Artifacting
« on: 2010 August 13 08:54:38 »
Not sure if anyone else caught this but CurvesTransformation creates artifacts in the bottom right hand corner of an image. 

This can be reproduced with 16bit integer grey images.  On a picture about 50 by 50 pixels 7 or so pixels at the bottom RHS are not right...

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: CurvesTransformation Artifacting
« Reply #1 on: 2010 August 13 09:46:13 »
Hi,

This is a confirmed bug in 1.6.1, all platforms. Thank you for catching it.

This bug is not generating artifacts; the bottom right pixels are simply not processed. Note that this bug only affects a small fraction of the pixels in the last row (just at the bottom edge of the image), less than 8 pixels to be precise, although I haven't reproduced it with more than 8 logical processors.

The problem seems a regression in the multithreaded implementation of the CurvesTransformation and ColorSaturation tools (both tools share the same basic processing engine). The last thread seems to exit prematurely, depending on the number of processors being used (the number of threads) and the dimensions of the image being transformed.

Workaround: One of the following:

1. Crop your image such that its height is an integer multiple of the number of processors (or processor cores) being used by PixInsight.

2. Reduce the number of processors used by PixInsight with the 'parallel' command, before CurvesTransformation or ColorSaturation execution. For example:

   parallel -m=3

will force PI to use no more than 3 logical processors. The following command:

   parallel -reset

will return PI to its normal state regarding parallel execution (all processors available will be used). Run these commands from the Processing Console window.

Sorry for the inconvenience. This bug is being fixed immediately. I'll publish a fixed version of the IntensityTransformations module as soon as I can.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: CurvesTransformation Artifacting
« Reply #2 on: 2010 August 13 10:18:51 »
Hi again,

This bug has now been fixed. It was quite easy to find and fix, actually.

After inspecting the source code, I can tell for sure that this little bug has been present in all PI distributions for several versions, probably since one of the initial 1.4 releases. Interestingly, nobody --including myself-- had noticed it before. Obviously, the most little things are the hardest to see! :)

Thanks again. I'll try to publish the fixed module as soon as possible.
 
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline darkownt

  • PixInsight Enthusiast
  • **
  • Posts: 92
Re: CurvesTransformation Artifacting
« Reply #3 on: 2010 August 13 11:56:31 »
No problem!  Glad it was an easy fix.

I only noticed it because I was using the transform to black out low level noise in extracted PFSs, and keep the bright ones in the middle the same intensity.  Since PSFs are generally small in size, I could see that the center looked great and most outer noise pixels were blacked out, all except for the strange pixels in the bottom RHS which were not going away... no matter what I did! (all was good as I used another function as a work around)

cheers
:)