New Tool: AdaptiveStretch

Juan Conejero

PixInsight Staff
Staff member
Hi everybody,

I am pleased to announce that today we have released a new tool: AdaptiveStretch. This new tool is now available to all PixInsight users as an update for all supported platforms.

AdaptiveStretch is a general contrast and brightness manipulation tool in PixInsight. It implements a nonlinear intensity transformation computed from existing pairwise pixel differences in the target image. The process can be controlled through a single noise threshold parameter. Basically, brightness differences below the noise threshold are regarded as due to the noise and other spurious variations, and are thus attenuated or not enhanced. Brightness differences above the noise threshold are interpreted as significant changes in the image, so the process tends to enhance them. The reference documentation for AdaptiveStretch is now available online:

http://pixinsight.com/doc/tools/AdaptiveStretch/AdaptiveStretch.html

and of course we also have released it as an update.

The basic algorithm has been described by Maria and Costas Petrou. [1] This elegant algorithm has been implemented by PTeam member Carlos Milovic, who has made important and clever modifications to make it more efficient and versatile. Carlos has done a very nice work in the core implementation of this tool. I have revised Carlos' original implementation to optimize and parallelize all processes, and have designed and written the tool's user interface. We have introduced important new features in the interface of this tool, such as auxiliary tool windows (slave interfaces) and real-time graph generation, which we'll exploit in future versions of existing and new tools, starting from PI version 1.8.

Despite the fact that this tool seems a very simple one---it is basically a one-parameter process after all---, its simplicity is only apparent. This little tool can teach you more about the dynamics of your images than some popular, ubiquitously used applications. Enjoy!

[1] Maria Petrou and Costas Petrou, Image Processing: The Fundamentals, Second Edition, John Wiley and Sons Ltd., 2010, pp. 377?382.
 
Cool tool. First experiments show nice results.

On my Win7-x64 computer, the noise threshold slider does not follow mouse movements well when the Realtime Preview is opened. Also the Real-Time curve preview does not respond if the realtime preview is not activated.

Georg

PS: Nice to see it is released at the same time as the documentation  :)
 
i see. i just ask because masked stretch should protect lower SNR areas of the image, which is what this seems to do.

would you suggest this tool to do the initial stretch of linear data or would you use it later in the flow?
 
would you suggest this tool to do the initial stretch of linear data or would you use it later in the flow?

It's a general contrast manipulation tool, so it can be used anywhere in the workflow. However, this tool only makes sense for images that have brightness/contrast problems, such as linear images, or wrongly exposed images.

Once you get the hang of it, AdaptiveStretch is terrific to perform the initial stretch of most raw images. It is just a different, more objective way to understand and implement this task. Just try it and see if you like the results!
 
Hi Georg,

Thanks! :)

On my Win7-x64 computer, the noise threshold slider does not follow mouse movements well when the Realtime Preview is opened.

The AdaptiveStretch task is quite intensive, so a beefy machine really helps. However, it's true that slider controls are less than ideal to implement real-time adjustments. This is due to the way sliders generate interface events. I am considering replacing these sliders with custom controls. For example, something similar to ScreenTransferFunction.

Also the Real-Time curve preview does not respond if the realtime preview is not activated.

This is by design. The curve does not exist unless you apply the algorithm to an image, since the algorithm is an adaptive one. When the real-time preview function is disabled, the curve graph simply displays the latest computed curve.
 
Juan Conejero said:
would you suggest this tool to do the initial stretch of linear data or would you use it later in the flow?

It's a general contrast manipulation tool, so it can be used anywhere in the workflow. However, this tool only makes sense for images that have brightness/contrast problems, such as linear images, or wrongly exposed images.

Once you get the hang of it, AdaptiveStretch is terrific to perform the initial stretch of most raw images. It is just a different, more objective way to understand and implement this task. Just try it and see if you like the results!

thanks. the question came up in my mind because right after the release i used AS to stretch the linear version of an image i had previously processed with MS and HT, and was pleased with the results. but then this morning i tried to use it to stretch a new image (M101) and completely failed. i started wondering if the first time i had been working with data which had already been stretched (long story - could not save a project and ended up saving the individual files.) my computer crashed overnight so now the AS test i was working on is gone, and i can't check.

so, i started wondering if this tool could be used for such a 'radical' stretch. i guess the answer is yes, so i'm not sure what i messed up the 2nd time.


 
Back
Top