Sample a square pixel image into hexagonal pixel image

6 vues (au cours des 30 derniers jours)
Kashmira Nakhoda
Kashmira Nakhoda le 13 Août 2019
Commenté : Kashmira Nakhoda le 16 Août 2019
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 commentaire
Guillaume
Guillaume le 14 Août 2019
Modifié(e) : Guillaume le 14 Août 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.

Connectez-vous pour commenter.

Réponse acceptée

Neuropragmatist
Neuropragmatist le 14 Août 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.
  1 commentaire
Kashmira Nakhoda
Kashmira Nakhoda le 16 Août 2019
Thank you very much Metioche. That is very helpful!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by