To apply DistanceTransform for shape recognition, I want to center all images in a fixed point {cx,cy}
. I mean each image's centroid should be {cx,cy}
.
I am using this code but It does not wrok.
{cx,cy}={50,50}.
cen=ComponentMeasurements[im1, "Centroid"][[All, 2]]
ImageTransformation[im1, (# + {cx, cy} - cen) &]
What is wrong?