Skip to content

计算机全息计算与仿真框架【This library introduces the current production process of computer holography, and uses MATLAB and Python to record and reproduce holograms. In the future, I will build a computer hologram simulation framework or a simulation application program.】

Notifications You must be signed in to change notification settings

stillby/Computer-Generated-Hologram

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer-Generated-Hologram

✨This library introduces the current production process of computer holography, and uses MATLAB and Python to record and reproduce holograms. In the future, I will build a computer hologram simulation framework or a simulation application program.

Introduction

CGH stands for computer-generated holograms (CGH). Holograms are unique in their ability to record both the intensity and phase of information.

More Resource to learn holography 👉 Awesome Holography👈

Iterative Method

The iterative algorithm usually starts from an approximation of the target hologram, and continuously optimizes the approximate hologram through a series of repeated operations until the reconstructed image obtained by the approximation meets certain error requirements.

GS-Base Algorithm

According to the amplitude distribution of the hologram plane and the reconstructed image plane, the phase information of the light field in the hologram plane can be obtained by iterating the forward and reverse light wave transmission and the restrictions imposed on the two planes.

Algorithm Paper Link
GS(Gerchberg-Saxton) Algorithm 👉Paper Code
Fienup Algorithm 👉Paper Code

Error Diffusion Method

The error diffusion algorithm iterates between the pixels of the hologram plane in turn, rather than between the hologram plane and the object image plane,Without any information of the object image, only the complex amplitude hologram itself can be directly operated on it and a pure phase hologram can be calculated.

Algorithm Paper Link
Error Diffusion Algorithm 👉Paper Code

Non Iterative Method

CGH Class Document Link
Circuitous Phase Type Hologram/Fourier Hologram【迂回位相型全息图】 👉Doc Code
Kinoform【相息图】 👉Doc Code
Fresnel Hologram【菲涅尔全息图】 👉Doc Code
Off Axis Interference Hologram【离轴干涉全息图】 👉Doc Code

Usage

Working on a hologram simulation API.

Experiment

Before Experiment

Before experimenting, it's best to understand common image formats and their fundamentals. Understanding the pixel level of an image will help you experiment better and give you a better understanding of the fundamentals of image processing.

Here are some examples of images you should pay more attention to the suffix of the image, and the size of the image, so that you can work with the image later.

64×64-test.bmp

256×256-lena.png

Fourier Hologram

Circuitous Phase Type Hologram/Fourier Hologram is Binary hologram.

DataSet

For this experiment we used this image for testing

64×64-test.bmp

Experimental Principle

Please read this Document.

Experimental Procedure

Two ways to do experiments are provided here, Matlab or Python, and you can choose the familiar way to run the code.

  • Run the fourier_hologram.m or fourier_hologram.py, They are in the Python and Matlab folders respectively.
  • Then you will get Circuitous Phase Type Hologram/Fourier Hologram below.

  • Finally, after running the program, you can get the reproduced graph and compare it with the original image.

Kinoform

DataSet

For this experiment we used this image for testing

256×256-lena.png

Experimental Principle

Please read this Document.

Experimental Procedure

Two ways to do experiments are provided here, Matlab or Python, and you can choose the familiar way to run the code.

  • Run the kinoforms.m or kinoforms.py, They are in the Python and Matlab folders respectively.
  • Then you will get Kinoform below.

  • Finally, after running the program, you can get the reproduced graph and compare it with the original image.

Off Axis Interference Hologram

DataSet

For this experiment we used this image for testing

Experimental Principle

Please read this Document.

Experimental Procedure

Two ways to do experiments are provided here, Matlab or Python, and you can choose the familiar way to run the code.

  • Run the offaxis_interference_hologram.m or offaxis_interference_hologram.py, They are in the Python and Matlab folders respectively.
  • Then you will get Off Axis Interference Hologram below.

  • Finally, after running the program, you can get the reproduced graph and compare it with the original image.

Contact

If you have any questions or good ideas, please contact: jackcc0701@163.com

About

计算机全息计算与仿真框架【This library introduces the current production process of computer holography, and uses MATLAB and Python to record and reproduce holograms. In the future, I will build a computer hologram simulation framework or a simulation application program.】

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 65.2%
  • MATLAB 34.8%