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

StarNet: star removing software

astrophotography
  • Please log in to reply
240 replies to this topic

#51 airscottdenning

airscottdenning

    Mariner 2

  • *****
  • Posts: 205
  • Joined: 22 Aug 2008
  • Loc: Colorado

Posted 25 March 2019 - 08:15 PM

Were you able to follow instructions from Rob and get it running?

No. I did the following:

 

ln -s StarNet_MacOS/libtiff.dylib /usr/local/opt/libtiff.5.dylib

brew install webp
brew link jpeg

 

Then 

./run_rgb_starnet.sh rgb_test5.tif

 

I get the following error:

 

dyld: Library not loaded: @rpath/libtiff.5.dylib
  Referenced from: /Users/denning/Dropbox/AstroSync/2.StarNet/StarNet_MacOS/./rgb_starnet++
  Reason: image not found
./run_rgb_starnet.sh: line 2: 70594 Abort trap: 6           ./rgb_starnet++ rgb_test5.tif rgb_test5_s.tif 64

 

I will try the Windows version. 

 

I got the python version working fine last week, and I will be patient for a binary version that will run on my mac. 

 

Thanks again for all your great work on this -- it will be a huge help to have it working as a PixInsight process!



#52 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 25 March 2019 - 08:46 PM

No. I did the following:

 

ln -s StarNet_MacOS/libtiff.dylib /usr/local/opt/libtiff.5.dylib

brew install webp
brew link jpeg

 

Then 

./run_rgb_starnet.sh rgb_test5.tif

 

I get the following error:

 

dyld: Library not loaded: @rpath/libtiff.5.dylib
  Referenced from: /Users/denning/Dropbox/AstroSync/2.StarNet/StarNet_MacOS/./rgb_starnet++
  Reason: image not found
./run_rgb_starnet.sh: line 2: 70594 Abort trap: 6           ./rgb_starnet++ rgb_test5.tif rgb_test5_s.tif 64

 

I will try the Windows version. 

 

I got the python version working fine last week, and I will be patient for a binary version that will run on my mac. 

 

Thanks again for all your great work on this -- it will be a huge help to have it working as a PixInsight process!

Try to just create a copy of libtiff.dylib in the same folder and name it libtiff.5.dylib, that should work!



#53 airscottdenning

airscottdenning

    Mariner 2

  • *****
  • Posts: 205
  • Joined: 22 Aug 2008
  • Loc: Colorado

Posted 26 March 2019 - 08:39 AM

Try to just create a copy of libtiff.dylib in the same folder and name it libtiff.5.dylib, that should work!

I tried copying libtiff.dylib to libtiff.5.dylib in the StarNet_MacOS directory and got exactly the same error. 

 

Do you mean make a copy in one of the lib directories (like /usr/local/opt)? I've already got a soft link to the file there with that name.

 

I can't figure out what directory @rpath points to.



#54 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 5172
  • Joined: 14 Jun 2009

Posted 26 March 2019 - 11:39 AM

https://en.wikipedia.org/wiki/Rpath

 

i think this means you can set LD_LIBRARY_PATH to point to a directory with shared libraries and dyld will look there to resolve dependencies.

 

anyway i think you have your symlink command mixed up. the syntax is "ln -s <original_file> <symbolic_link_name>". so in this command:

 

ln -s StarNet_MacOS/libtiff.dylib /usr/local/opt/libtiff.5.dylib

 

you made a symlink in /usr/local/opt that points to StarNet_MacOS/libtiff.dylib. which is probably not what you meant to do?

 

what you probably want is:

 

cd StarNet_MacOS

ln -s /usr/local/opt/libtiff.5.dylib .

 

however, to be clear, what i did was make a symlink libtiff.5.dylib -> libtiff.dylib (i didn't point to any lib directory in /usr/local or /opt/local, just essentially renamed the libtiff that starnet shipped with so dyld would find it.) then i installed libjpeg and webp: brew install libjpeg ; brew install webp

 

rob



#55 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 26 March 2019 - 12:04 PM

Do you mean make a copy in one of the lib directories (like /usr/local/opt)? I've already got a soft link to the file there with that name.

 

I can't figure out what directory @rpath points to.

@rpath was compiled to be the starnet's directory where all its files are ('./'). Did you put libtiff.5.dylib there?

 

however, to be clear, what i did was make a symlink libtiff.5.dylib -> libtiff.dylib (i didn't point to any lib directory in /usr/local or /opt/local, just essentially renamed the libtiff that starnet shipped with so dyld would find it.) then i installed libjpeg and webp: brew install libjpeg ; brew install webp

 

rob

Yes, that kinda what I have in mind, creating this link or simply copying libtiff.dylib to libtiff.5.dylib should both work. It was already shown to work.

 

I am getting more and more confused with all this.


Edited by nekitmm, 26 March 2019 - 12:05 PM.


#56 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 5172
  • Joined: 14 Jun 2009

Posted 26 March 2019 - 12:31 PM

by the way i looked at libtiff-master from https://gitlab.com/libtiff/libtiff and it looks to me like if you did ./configure --disable-webp --disable-jpeg --disable-old-jpeg

 

when you build libtiff that these problems would go away.

 

rob


  • nekitmm likes this

#57 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 26 March 2019 - 05:34 PM

by the way i looked at libtiff-master from https://gitlab.com/libtiff/libtiff and it looks to me like if you did ./configure --disable-webp --disable-jpeg --disable-old-jpeg

 

when you build libtiff that these problems would go away.

 

rob

Yes, great idea!

 

I went ahead, recompiled the library without any external dependencies, and linked it statically, so now it's just part of the executable now. I think (hope) there should be no more problems running it anymore.


Edited by nekitmm, 26 March 2019 - 05:37 PM.

  • pfile likes this

#58 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 26 March 2019 - 05:36 PM

I tried copying libtiff.dylib to libtiff.5.dylib in the StarNet_MacOS directory and got exactly the same error. 

 

Do you mean make a copy in one of the lib directories (like /usr/local/opt)? I've already got a soft link to the file there with that name.

 

I can't figure out what directory @rpath points to.

Could you please try downloading and running the distribution again? The problem should be solved (I hope)!



#59 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 5172
  • Joined: 14 Jun 2009

Posted 26 March 2019 - 06:16 PM

i downloaded the new zipfile and indeed it works fine now. thanks!

 

rob


  • nekitmm likes this

#60 Destin1701

Destin1701

    Viking 1

  • -----
  • Posts: 705
  • Joined: 26 Feb 2014
  • Loc: Boston area, MA

Posted 26 March 2019 - 06:48 PM

I also just downloaded the new zip file and it works on my Mac as well.  Outstanding! 

Destin


  • nekitmm likes this

#61 airscottdenning

airscottdenning

    Mariner 2

  • *****
  • Posts: 205
  • Joined: 22 Aug 2008
  • Loc: Colorado

Posted 27 March 2019 - 08:52 AM

Downloaded and ran the new version with no problems on my 2018 MacBook pro under macOS 10.14.3

 

Thank you!


  • nekitmm likes this

#62 airscottdenning

airscottdenning

    Mariner 2

  • *****
  • Posts: 205
  • Joined: 22 Aug 2008
  • Loc: Colorado

Posted 27 March 2019 - 09:44 AM

One question: can you help me to get my (RGB) images into the right format for this?

 

I saved a color image from PixInsight as a tif, and specified "16 bit unsigned integer" in the save dialog. Then I ran rgb_starnet++ on the resulting file and got the message "Only 16bit Color (RGB) tif images are supported!"

 

By contrast, I can run mono_starnet++ on a grayscale tif saved from PixInsight with exactly the same parameters, and get fantastic star removal.

 

Perhaps I just don't understand how these images are supposed to be saved?



#63 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 5172
  • Joined: 14 Jun 2009

Posted 27 March 2019 - 10:50 AM

what you did should work... when starnet runs it prints on the console the bit depth of the file and the number of planes (you should see "Bits per sample: 16" and "Samples per pixel: 3" for an RGB tiff image.) what do you see for your image that doesn't work?

 

rob



#64 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 27 March 2019 - 06:48 PM

One question: can you help me to get my (RGB) images into the right format for this?

 

I saved a color image from PixInsight as a tif, and specified "16 bit unsigned integer" in the save dialog. Then I ran rgb_starnet++ on the resulting file and got the message "Only 16bit Color (RGB) tif images are supported!"

 

By contrast, I can run mono_starnet++ on a grayscale tif saved from PixInsight with exactly the same parameters, and get fantastic star removal.

 

Perhaps I just don't understand how these images are supposed to be saved?

I just tried doing that and everything worked ok! The problem might be in some other place.

 

As Rob suggested, can you copy here the whole output from the program?


Edited by nekitmm, 27 March 2019 - 07:05 PM.


#65 airscottdenning

airscottdenning

    Mariner 2

  • *****
  • Posts: 205
  • Joined: 22 Aug 2008
  • Loc: Colorado

Posted 27 March 2019 - 07:11 PM

Thank you both ...

 

My failed image was diagnosed as 16 bits per pixel with *4* samples (not 3). It contained an alpha layer.

 

I re-did this in pixinsight and saved without the alpha channel and all is well.

 

I've gone back and reprocessed several of my recent images using this software and gotten substantially better results. I really like the ability to control star bloat and keep natural star colors in the final images.


  • nekitmm likes this

#66 airscottdenning

airscottdenning

    Mariner 2

  • *****
  • Posts: 205
  • Joined: 22 Aug 2008
  • Loc: Colorado

Posted 28 March 2019 - 07:13 PM

Here's an example of one of my images as originally processed in PixInsight (top), and then after separating the stars and nebulae using StarNet (bottom).

 

Removing the stars with StarNet let me process the nebulae much more aggressively without creating processing artifacts around the stars. Conversely, I was able to leave the stars mostly as is for a much more natural look and nice star color.

 

This is a very challenging image because my filters produce huge reflections around Alnitak and Alnilam, which StarNet can't really handle. Other images are going to see bigger improvements from StarNet, but I thought it might be fun to share this with the group.

 

The images attached are just low-res previews. You can download the original here (19 MB), and the StarNet version here (14 MB).

 

original.jpeg

 

starnet.jpg

 


  • pfile, tannerswe and nekitmm like this

#67 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 30 March 2019 - 08:50 PM

Here's an example of one of my images as originally processed in PixInsight (top), and then after separating the stars and nebulae using StarNet (bottom).

 

Removing the stars with StarNet let me process the nebulae much more aggressively without creating processing artifacts around the stars. Conversely, I was able to leave the stars mostly as is for a much more natural look and nice star color.

 

This is a very challenging image because my filters produce huge reflections around Alnitak and Alnilam, which StarNet can't really handle. Other images are going to see bigger improvements from StarNet, but I thought it might be fun to share this with the group.

 

The images attached are just low-res previews. You can download the original here (19 MB), and the StarNet version here (14 MB).

 

attachicon.gif original.jpeg

 

attachicon.gif starnet.jpg

That's a very nice result! Big halos are indeed a problem, I don't think there is a way to deal with them...



#68 iwannabswiss

iwannabswiss

    Viking 1

  • *****
  • Posts: 810
  • Joined: 14 Feb 2014
  • Loc: Charleston SC

Posted 31 March 2019 - 01:45 PM

I've been following this thread waiting for some free time to test it out.  Absolutely awesome software!  Thanks for creating.  I haven't had a chance to image in a while but messed with some old HA data I took a year or so ago.  This is definitely going to be used quite a lot.

 

StarNet Edit

Edited by iwannabswiss, 31 March 2019 - 02:48 PM.

  • tannerswe and nekitmm like this

#69 nekitmm

nekitmm

    Explorer 1

  • *****
  • topic starter
  • Posts: 64
  • Joined: 25 Apr 2018

Posted 01 April 2019 - 04:23 PM

I've been following this thread waiting for some free time to test it out.  Absolutely awesome software!  Thanks for creating.  I haven't had a chance to image in a while but messed with some old HA data I took a year or so ago.  This is definitely going to be used quite a lot.

 

That's very nice result you got there!

 

I am glad that the program worked well for you!

 

Thank you!



#70 futuneral

futuneral

    Apollo

  • *****
  • Posts: 1004
  • Joined: 27 Dec 2014
  • Loc: Phoenix, AZ

Posted 01 April 2019 - 06:20 PM

I've been following this thread waiting for some free time to test it out.  Absolutely awesome software!  Thanks for creating.  I haven't had a chance to image in a while but messed with some old HA data I took a year or so ago.  This is definitely going to be used quite a lot.

 

I think it's remarkable how the processing preserved the two little black dots to the right of the trunk, while removing the two corresponding stars (I'm assuming those are also "trunks" made by those two stars, but they are pointing away from us, so we see them as black dots).



#71 futuneral

futuneral

    Apollo

  • *****
  • Posts: 1004
  • Joined: 27 Dec 2014
  • Loc: Phoenix, AZ

Posted 01 April 2019 - 06:34 PM

That's a very nice result! Big halos are indeed a problem, I don't think there is a way to deal with them...

Wouldn't it be possible to train a model to specifically remove the halos and run with that model before running the actual star-removal model? How sensitive do you think the tool will be to different sizes of halos?



#72 iwannabswiss

iwannabswiss

    Viking 1

  • *****
  • Posts: 810
  • Joined: 14 Feb 2014
  • Loc: Charleston SC

Posted 02 April 2019 - 07:43 AM

I think it's remarkable how the processing preserved the two little black dots to the right of the trunk, while removing the two corresponding stars (I'm assuming those are also "trunks" made by those two stars, but they are pointing away from us, so we see them as black dots).

Yeah, I was surprised.  Also the spot below, at the 6 o'clock position as well.

 

I also would love, as others have mentioned, to see a plugin for PixInsight and the ability to use on linear data.


Edited by iwannabswiss, 02 April 2019 - 07:44 AM.


#73 Andy01

Andy01

    Explorer 1

  • -----
  • Posts: 53
  • Joined: 11 Jan 2013
  • Loc: Melbourne, Australia

Posted 04 April 2019 - 06:34 AM

I would love to try this as it looks amazing, the results are brilliant & I’m always removing stars and replacing them with RGB in my NB images.
However, I’m an astrophotographer (most say a darn good one) and a mac user- but I’m not a computer programmer - please, please can you make this either an app or a simple Mac friendly interface for those of us who just like taking pictures - not programming or writing back end & obscure software commands.
Cheers
Andy
www.andysastro.com

#74 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 5172
  • Joined: 14 Jun 2009

Posted 04 April 2019 - 12:38 PM

nikita stated earlier in the thread:

 

> Yes, that's the plan, but you have to keep in mind that I don't have Mac and have never owned one, so my abilities are limited here.

 

so i don't think a mac gui version is forthcoming, at least from nikita. having said that it's really not that hard to use once the library issues were sorted. maybe you didn't know this but you can drag and drop files from the finder to Terminal.app, so you don't really even need to figure out how find the files you want to work on. the full pathnames of the file you drag into Terminal.app will appear on the command line after such a drag and drop operation.

 

rob



#75 Andy01

Andy01

    Explorer 1

  • -----
  • Posts: 53
  • Joined: 11 Jan 2013
  • Loc: Melbourne, Australia

Posted 05 April 2019 - 03:47 AM

Ok thanks Rob, I’ll give that a try- cheers!
Andy


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





Also tagged with one or more of these keywords: astrophotography



Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics