MATLAB Answers

Sample a square pixel image into hexagonal pixel image

17 ビュー (過去 30 日間)
Kashmira Nakhoda
Kashmira Nakhoda 2019 年 8 月 13 日
コメント済み: Kashmira Nakhoda 2019 年 8 月 16 日
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 件のコメント

Guillaume 2019 年 8 月 14 日
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.



Neuropragmatist 2019 年 8 月 14 日
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.

  1 件のコメント

Kashmira Nakhoda
Kashmira Nakhoda 2019 年 8 月 16 日
Thank you very much Metioche. That is very helpful!


その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by