Hi,
is there an easy way to place a small icon (icnImg; e.g.: 41 x 41 px) onto / into a bigger image (bigImg, e.g 1000 x 1000 px)?
My workaround is to replace the pixels of bigImg at the desired icon position with the pixels of icnImg.
The input images are loaded via IPCV imread()
function.
The resulting image is displayed via Matplot()
The approach works, and I like that there is only one axis entity for the resulting image.
But I see some drawbacks:
-
the approach needs a defines rectangle for masking the bigImg
-
edge cases might become fiddely
e.g: icnImg center is close to bigImg border
A different approach could work with newaxes()
for each icon.
I am just not sure with what I would place the icon relatively to the big image then: axes.margins
or axes.data_bounds
?
A bit of background:
I have a list with names of cities/villages/etc. connected with their geographical location [deg lat/ deg long / EPSG4326]
I also have a map, that fits the used coordinates system.
So I can plot the map and the coordinates accordingly using two different axes entities.
axes_1 => pixel coordinates
axes_2 => deg long / deg lat
However, I was thinking to use icons instead of polyline symbols to mark different location types.
thank you,
Philipp