Simple Resizing Using X Algorithm (e.g., Like Doing "Image Size" in Photoshop)?
astrostu
As a side-note, if it matters, the application: I want to "snap" the rim traces of impact craters on images that I've already identified. So I map out a crater in other software and I have lat/lon of, say, roughly every 5th pixel very roughly on the rim (might be off it by a few pixels in some areas). In Igor, I have imported my image, and I've written code that interpolates the points along my rim trace to one per pixel. It then extracts a radial profile (interpolating) from the feature's center through the rim and a little outside it (manually set buffer, like ±5 pixels from my original point). I have hard-coded the sun direction, so it knows if it expects bright-to-dark pixels or dark-to-bright. It takes the derivative and searches for the maximum positive or negative on the derivative (based on side of crater and sun direction) and says that max is the true rim point. It works okay, and I have filters in there to try to prevent it from locking onto spurious features, but image noise is killing me, and on Mars the rims of craters can be flat for several pixels which screws up my derivative. So what I want to try now is to extract the crater feature image (plus buffer) and resample it to be smaller, which will reduce spurious features it could lock onto and decrease the image noise. Find the correct rim point via the code I've already written, and then steadily enlarge the image back to the original size, but each time the buffer now is only the "up-sampling" from the original resize, so it searches only within that original found pixel for the rim. Sorry if I'm not explaining this fully clearly enough, it's still in my head because I can't find an image resize! But I thought explaining it might help, and thought posting this might spark some idea if anyone has any better idea in how to deal with non-ideal circumstances with my craters.
ImageInterpolate
should do it. With the keyword Resample or maybe Affine2D?March 2, 2018 at 11:36 pm - Permalink
March 3, 2018 at 09:21 am - Permalink
NewImage twod
Imageinterpolate/TRNS={scaleShift,0,0.5,0,0.5} resample twod
NewImage M_InterpolatedImage
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
March 4, 2018 at 10:31 am - Permalink