7 Replies Latest reply on Apr 16, 2015 2:28 PM by JJMack

    automatically finding the center of gravity of a selection

    igalp53525267

      Hello,

       

      I was wondering whether there's a way in PS or (even better) ExtendScript to automatically find the center of gravity of a selection?

      I am script processing hundreds of images, automatically removing most of the background.

      Left with the product image itself and leftovers of the background (which I'm perfectly OK with), I would now like to automatically locate the gravity center of the selection (hopefully the approximate center of the product image) and move it to the document's center.

       

      Any thoughts?

       

      Thanks,

      Guy