Sample a square pixel image into hexagonal pixel image

6 views (last 30 days)
I want to see how an image would be modified if the sampling pixels are hexagonally shaped (regular hexagonal) instead of square shaped.
I know I want to:
1) interpolate my square pixel image to a more continuous image.
2) resample that interpolatated image with regular hexagonal pixels.
Is there a Matlab native function that does or could help resolve point 2 ?
Thank you very much for your help!
  1 Comment
Guillaume
Guillaume on 14 Aug 2019
Edited: Guillaume on 14 Aug 2019
If you have hexagonal pixels, what do you do at the edges? Have half hexagons or jagged edges?
Also, what interpolation method would you use? With square or rectangular pixels, bilinear or bicubic interpolation makes sense. With hexagons, will you have tri-linear or tri-cubic interpolation? If so, this is something that you'll have to implement yourself. In fact, you'll ave to implement all the image processing functions, since as Metioche says in his/her answer, everything is based on orthogonal grids.

Sign in to comment.

Accepted Answer

Neuropragmatist
Neuropragmatist on 14 Aug 2019
I don't think there is anything native to matlab that would work for you - remember that Matlab is all about matrices, which have square elements. The fact that you can image a matrix and display it with square pixels is really just a convenient feature of matrices.
But maybe this would help you:
Probably the easiest solution would be to make your own interpolation algorithm to get hexagonal data from an image with square pixels, store this information in a normal matrix and then display it using something like the above. This would be easiest, but still certainly not easy.
M.

More Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!