Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Converting a Non-Linear image back into Linear Image

  • Please log in to reply
6 replies to this topic

#1 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1658
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 19 February 2019 - 09:16 AM

Is there a way to take a stretched image and somewhat pseudo convert it back to a linear image? 

 

I'm working on some image processing exercises for a couple workshops I'm hosting, and this would be of help (if possible) in the preparation of some class exercises I am envisioning.

 

Dan

 

 



#2 happylimpet

happylimpet

    Soyuz

  • *****
  • Posts: 3563
  • Joined: 29 Sep 2013
  • Loc: Southampton, UK

Posted 19 February 2019 - 09:34 AM

Theoretically there's no reason why not - if you know the transformation you applied in the first place, you can just apply the inverse.


  • OldManSky likes this

#3 OldManSky

OldManSky

    Viking 1

  • -----
  • Posts: 851
  • Joined: 03 Jan 2019
  • Loc: Valley Center, CA USA

Posted 19 February 2019 - 09:35 AM

You could theoretically do it with a "stretch" that is the exact inverse of the one you already applied...

The sticking point would be that during the first stretch, some values may have clipped/gone out of range.  If that has occurred, nothing will bring it back to what it was.



#4 james7ca

james7ca

    Fly Me to the Moon

  • *****
  • Posts: 6700
  • Joined: 21 May 2011
  • Loc: San Diego, CA

Posted 19 February 2019 - 10:02 AM

And, of course, if you've already converted it to a lower bit depth (say going from a linear 32-bit to a non-linear 16-bit or heaven forbid 8-bit) then there will be no way to go back without a loss of detail.



#5 bobzeq25

bobzeq25

    Hubble

  • *****
  • Posts: 15467
  • Joined: 27 Oct 2014

Posted 19 February 2019 - 10:56 AM

StarTools has a simple tool designed precisely for this task.  You need a tiff.  When you open that tiff in StarTools, there are always four buttons.  One is "non-linear image, attempt to reverse stretch".

 

I have no ideas what it does, but I have some familiarity with the designer Ivo Jager.  Whatever it does, it probably does it well.

 

There's a free trial for StarTools (which is about $60) but, unfortunately, what makes it a free trial is that saving anything is disabled.


Edited by bobzeq25, 19 February 2019 - 10:59 AM.

  • psandelle likes this

#6 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1658
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 19 February 2019 - 10:58 AM

Yeah, now that I think of it, I guess going the opposite direction is impossible unless you knew exactly what the stretching function was.

 

 

You certainly wouldn't be able to take an stretched pixel value and then determine what the original pixel value was if no other information was available.

 

Thanks
Dan


  • OldManSky likes this

#7 Gipht

Gipht

    Surveyor 1

  • *****
  • Posts: 1613
  • Joined: 12 Nov 2016
  • Loc: Prescott Valley, AZ.

Posted 20 February 2019 - 10:01 AM

The reverse stretch in Star  Tools works well if all you have done is stretched the image.  If you have stretched and performed one of the wipe commands, added color,  sharpened, or any of the other  processing steps, then the reverse stretch does not work as well.


  • bobzeq25 likes this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics