Message Boards Message Boards

Deep fields: pixel sorting Hubble images of deep space

Posted 3 years ago

POSTED BY: Jack Madden
18 Replies

I think this post/function from @Erik Mahieu may interest you:

Pixel sorting according to different methods
https://community.wolfram.com/groups/-/m/t/547944

POSTED BY: Ahmed Elbanna

Thank you for that info!

Fun code, Jack. Had to try it on an old Markarian's Chain image I took. Works nicely. Looking forward to future developments.

enter image description here

This is amazing!! thank you so much for sharing :)

POSTED BY: Jack Madden

I've tried minting a few of these images on OpenSea.io. Is anyone else making Mathematica based art on the blockchain?

BlockchainAddressData["0x8f6d5001f1c5dfe227c7025d168364461971004a"] (*Wallet*)

BlockchainAddressData["0x495f947276749Ce646f68AC8c248420045cb7b5e"] (*Artwork Contract*)
POSTED BY: Jack Madden

Very nice work!

POSTED BY: Jack Madden

Thank you! Your work is beautiful too! Note that my NFTs are on Tezos blockchain (which we already support on WL).

Also, very nice work with the pixel sorting. I submitted a pixel sorting function to the Wolfram Function Repository but it's still not live yet. I can update you once it's live because your feedback would be great and maybe we can collaborate on a second version :)

Sounds great, thank you!

POSTED BY: Jack Madden

Once again, this time with Christian's PixelSort function on one of my Orion Nebula area images from 2016. Fiddling with Level gives some interesting different versions of the image. I liked this one the best. Can you extend the Direction option to sort diagonally at various angles? Maybe a Manipulate to adjust Direction and Level, though on my machine that might be a little slow.

enter image description here

@Steven Christensen Amazing image, how did you get Orion Nebula area images? I mean what are the specs you used in your telescope and camera?

POSTED BY: Ahmed Elbanna

Ahmed,

Back in October of 2016 at a star party in Staunton River State Park, a dark site in southern Virginia, I used a Stellarvue 102mm triplet refractor, a Canon 60D camera, and an Orion Atlas mount. I took two hours of 90sec and another hour or so of 45sec exposures and stacked them in Deep Sky Stacker and finished in Photoshop. I still use the Stellarvue 102, but am moving to a ZWO ASI 2600mm Pro monochrome camera with 36mm filters on an Atlas Pro mount with guiding etc. I stack in Pixinsight and then process in Photoshop. The technology, both hardware and software, has upgraded enormously in five years.

Amazing Steven. Thank you for the info.

POSTED BY: Ahmed Elbanna

Very nice :) Adam Ferriss is an artist who uses this style of sorting with space images. I was working on an angle mode the other day. Code is still a rough draft though, breaks easily if you try to push the cone off the edge.

deepfields[source_, fraction_, width_, sort_, rotate_, size_, mode_, 
  m_] := Module[{newpic = {}, left, middle, right, picdat = source},

  Which[
   mode == "Straight",
   If[rotate == 0, , picdat = Transpose[picdat]];
   Do[
    left = 
     SortBy[picdat[[i, 1 ;; Floor[Length[picdat[[i]]]*fraction]]], 
      sort];
    middle = 
     picdat[[i, 
       Floor[Length[picdat[[i]]]*fraction + 1] ;; 
        Floor[Length[picdat[[i]]]*(fraction + width)]]];
    right = 
     Reverse[SortBy[
       picdat[[i, 
         Floor[Length[picdat[[i]]]*(fraction + width) + 1] ;; All]], 
       sort]];
    AppendTo[newpic, Join[left, middle, right]];
    , {i, 1, Length[picdat]}];
   If[rotate == 0, , newpic = Transpose[newpic]];

   , mode == "Angle",
   If[rotate == 0, , picdat = Transpose[picdat]];
   Do[
    left = 
     SortBy[picdat[[i, 
        1 ;; Floor[
          Length[picdat[[i]]]*(fraction - i/(m*Length[picdat]))]]], 
      sort];
    middle = 
     picdat[[i, 
       Floor[Length[picdat[[i]]]*(fraction - i/(m*Length[picdat])) + 
          1] ;; 
        Floor[Length[
           picdat[[i]]]*((fraction + i/(m*Length[picdat])) + width)]]];
    right = 
     Reverse[SortBy[
       picdat[[i, 
         Floor[Length[
              picdat[[i]]]*((fraction + i/(m*Length[picdat])) + 
               width) + 1] ;; All]], sort]];
    AppendTo[newpic, Join[left, middle, right]];
    , {i, 1, Length[picdat]}];
   If[rotate == 0, , newpic = Transpose[newpic]];
   ];

  Image[newpic, ImageSize -> size]
  ]

enter image description here

POSTED BY: Jack Madden

Hi @Steven Christensen . Thanks for using the function! The results looks beautiful.

And yes, I plan to expand the scope of the function once I have some time. Diagonal direction is something on my bucket list, although I need to think of how to do it properly. I also want to add more modes and a way to accept a custom functions as a mode.

I wouldn't add a Manipulate to the function itself but add an example to the Neat Examples section, as I did with the animation.

Any other feedback is much appreciated. Thanks!

BTW, using my function, I got similar results to @Jack Madden 's with a Hubble image:

image = Import["http://cdn.eso.org/images/screen/eso1738b.jpg"]    
ResourceFunction["PixelSort"][image, <|"Level" -> 1, "LevelTest" -> "Max"|>]

enter image description here

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract