Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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
add comment

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?

share|improve this answer
add comment

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.