# Is there an easy way to create a “IntensitySquaredCentroid” using ComponentMeasurements?

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?

-
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

## 1 Answer

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?

-