Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of the options in ComponentMeasurements is to compute a centroid based on the pixel values of some underlying image. We can write:

ComponentMeasurements[{MorphologicalComponents[image], image}, "IntensityCentroid"][[All, 2]];

Is it possible, however, to have something like an intensity squared or cubed centroid?

share|improve this question
2  
Why not just pass Image[ImageData[image]^3] to ComponentMeasurements? – nikie Jul 1 '13 at 6:47
    
@nikie, or ImageApply[#^3 &, image] or even ImageAdjust[image, {0,0,3}]. I suggest you post your comment as an answer. – Simon Woods Jul 11 '13 at 10:06

Turning the comments into an answer. Why not just pass Image[ImageData[image]^3] or ImageApply[#^3 &, image] or even ImageAdjust[image, {0,0,3}] to ComponentMeasurements?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.