I want to select a pixel in an image using floating-point numbers as indexes. The Matlab documentation says that this is possible using “spatial coordinates”. However, it doesn’t provide any clues on how to do it. How can I select a pixel from an image using floating-point indexes (“spatial coordinates”)?
Suppose that I have the following code:
i = imread('pout.tif')
get_pixel_by_spatial_coords(i, 1.5, 3.63)
What’s the real name of the function get_pixel_by_spatial_coords?
I think the linked article on spatial coordinates was only describing the coordinate systems used by various image plotting routines.
Your your purpose, simply round the number. Depending on the context, use one of: