Openholo  v4.1
Open Source Digital Holographic Library
OpenholoGeneration.py File Reference

Go to the source code of this file.

Namespaces

 OpenholoGeneration
 

Functions

def OpenholoGeneration.plyfile (file, progress=gr.Progress(track_tqdm=True))
 
def OpenholoGeneration.rgbfile (file, progress=gr.Progress(track_tqdm="True"))
 
def OpenholoGeneration.depthfile (file, progress=gr.Progress(track_tqdm="True"))
 
def OpenholoGeneration.lightfile (directory, progress=gr.Progress(track_tqdm="True"))
 
def OpenholoGeneration.trimeshfile (file, progress=gr.Progress(track_tqdm=True))
 
def OpenholoGeneration.wrpplyfile (file, progress=gr.Progress(track_tqdm=True))
 
def OpenholoGeneration.pointXmlParing (file)
 
def OpenholoGeneration.depthXmlParing (file)
 
def OpenholoGeneration.lightXmlParing (file)
 
def OpenholoGeneration.trimeshXmlParing (file)
 
def OpenholoGeneration.wrpXmlParing (file)
 
def OpenholoGeneration.pointGenerate (Diffraction, Encoding, Precision, pc_mode)
 
def OpenholoGeneration.depthGenerate (Encoding, pc_mode)
 
def OpenholoGeneration.lightGenerate (Encoding, pc_mode)
 
def OpenholoGeneration.trimeshGenerate (Encoding, pc_mode)
 
def OpenholoGeneration.wrpGenerate (Encoding, pc_mode)
 

Variables

string OpenholoGeneration.PointConfig = ""
 
string OpenholoGeneration.DepthConfig = ""
 
string OpenholoGeneration.LightConfig = ""
 
string OpenholoGeneration.TrimeshConfig = ""
 
string OpenholoGeneration.WrpConfig = ""
 
string OpenholoGeneration.ply = ""
 
string OpenholoGeneration.rgb = ""
 
string OpenholoGeneration.depth = ""
 
string OpenholoGeneration.light = ""
 
string OpenholoGeneration.trimesh = ""
 
string OpenholoGeneration.wrpply = ""
 
 OpenholoGeneration.theme
 
 OpenholoGeneration.css
 
 OpenholoGeneration.title
 
 OpenholoGeneration.label
 
 OpenholoGeneration.pointxml = gr.File(label="Choose a PointCloud Config (.xml) File to Upload",interactive="True")
 
 OpenholoGeneration.plyout = gr.Textbox(label="[Warning] Please wait until the size of the ply file to be uploaded is large and displayed in the temporary path in the text box below. The upload is complete when the box below is displayed.")
 
 OpenholoGeneration.point_Scale_X = gr.Textbox(label = "Scale X", placeholder="0.01")
 
 OpenholoGeneration.s
 
 OpenholoGeneration.inputs
 
 OpenholoGeneration.point_Scale_Y = gr.Textbox(label = "Scale Y", placeholder="0.01")
 
 OpenholoGeneration.point_Scale_Z = gr.Textbox(label = "Scale Z", placeholder="0.01")
 
 OpenholoGeneration.point_Distance_pre = gr.Textbox(label = "Distance", placeholder="0.5")
 
 OpenholoGeneration.point_PixelPitch_X = gr.Textbox(label = "PixelPitch X", placeholder="10e-6")
 
 OpenholoGeneration.point_PixelPitch_Y = gr.Textbox(label = "PixelPitch Y", placeholder="10e-6")
 
 OpenholoGeneration.point_PixelNum_X = gr.Textbox(label = "PixelNum X", placeholder="1920")
 
 OpenholoGeneration.point_PixelNum_Y = gr.Textbox(label = "PixelNum Y", placeholder="1080")
 
 OpenholoGeneration.point_WaveLength_1 = gr.Textbox(label = "WaveLength1", placeholder="638e-9")
 
 OpenholoGeneration.point_WaveLength_2 = gr.Textbox(label = "WaveLength2", placeholder="520e-9")
 
 OpenholoGeneration.point_WaveLength_3 = gr.Textbox(label = "WaveLength3", placeholder="450e-9")
 
 OpenholoGeneration.Diffraction = gr.Dropdown(['R-S','Fresnel'], value="R-S", label = "Diffraction Flag" , info="Choose an flag!")
 
 OpenholoGeneration.Encoding = gr.Dropdown(['Phase','Amplitude','Real','Imaginary'], value="Phase", label = "Encoding Method" , info="Choose an encoding!")
 
 OpenholoGeneration.Precision = gr.Radio(["single", "double"], value="single", label="Precision (GPGPU)")
 
 OpenholoGeneration.pc_mode = gr.Radio(["CPU", "GPU"], value="GPU", label="CPU / GPU")
 
 OpenholoGeneration.pointOutput = gr.Image(label="Point Cloud Bmp")
 
 OpenholoGeneration.pointGen = gr.Button(value = "Generate Point Cloud Hologram")
 
 OpenholoGeneration.fn
 
 OpenholoGeneration.pointXmlParing
 
 OpenholoGeneration.outputs
 
 OpenholoGeneration.plyfile
 
 OpenholoGeneration.show_progress
 
 OpenholoGeneration.pointGenerate
 
 OpenholoGeneration.depthxml = gr.File(label="Choose a Depthmap Xml File to Upload",interactive="True")
 
 OpenholoGeneration.bmprgb = gr.File(label="Choose a Rgb File to Upload",interactive="True")
 
 OpenholoGeneration.rgbout = gr.Textbox(label="[Warning] Please wait until the size of the rgb file to be uploaded is large and displayed in the temporary path in the text box below. The upload is complete when the box below is displayed.")
 
 OpenholoGeneration.bmpdepth = gr.File(label="Choose a Depthmap File to Upload",interactive="True")
 
 OpenholoGeneration.depthout = gr.Textbox(label="[Warning] Please wait until the size of the depth file to be uploaded is large and displayed in the temporary path in the text box below. The upload is complete when the box below is displayed.")
 
 OpenholoGeneration.depth_FieldLength = gr.Textbox(label = "Field Lens(m)", placeholder="1000e-3")
 
 OpenholoGeneration.depth_NumOfDepth = gr.Textbox(label = "Num Of Depth", placeholder="256")
 
 OpenholoGeneration.depth_NearOfDepth = gr.Textbox(label = "Near Depth(m)", placeholder="0.4")
 
 OpenholoGeneration.depth_FarOfDepth = gr.Textbox(label = "Far Depth(m)", placeholder="0.6")
 
 OpenholoGeneration.depth_PixelPitchX = gr.Textbox(label = "PixelPitch X(m)", placeholder="10e-6")
 
 OpenholoGeneration.depth_PixelPitchY = gr.Textbox(label = "PixelPitch Y(m)", placeholder="10e-6")
 
 OpenholoGeneration.depth_PixelNumX = gr.Textbox(label = "PixelNum X", placeholder="1920")
 
 OpenholoGeneration.depth_PixelNumY = gr.Textbox(label = "PixelNum Y", placeholder="1080")
 
 OpenholoGeneration.depth_WaveLength1 = gr.Textbox(label = "WaveLength1(m)", placeholder="638e-9")
 
 OpenholoGeneration.depth_WaveLength2 = gr.Textbox(label = "WaveLength2(m)", placeholder="520e-9")
 
 OpenholoGeneration.depth_WaveLength3 = gr.Textbox(label = "WaveLength3(m)", placeholder="450e-9")
 
 OpenholoGeneration.Propagation = gr.Dropdown(['Angular Spectrum'], value="Angular Spectrum", label = "Propagation Method" , info="Choose an Propagation!")
 
 OpenholoGeneration.depthXmlParing
 
 OpenholoGeneration.rgbfile
 
 OpenholoGeneration.depthfile
 
 OpenholoGeneration.depthOutput = gr.Image(label="DepthMap Bmp")
 
 OpenholoGeneration.depthGen = gr.Button(value = "Generate DepthMap Hologram")
 
 OpenholoGeneration.depthGenerate
 
 OpenholoGeneration.lightxml = gr.File(label="Choose a LightField Xml File to Upload",interactive="True")
 
 OpenholoGeneration.lightbmp = gr.File(label="Image Folder to Upload",interactive="True", file_count="directory")
 
 OpenholoGeneration.light_Distance = gr.Textbox(label = "Distance", placeholder="0.5")
 
 OpenholoGeneration.light_Image_NumOfX = gr.Textbox(label = "Num of Img X", placeholder="10")
 
 OpenholoGeneration.light_Image_NumOfY = gr.Textbox(label = "Num of Img Y", placeholder="10")
 
 OpenholoGeneration.light_PixelPitchX = gr.Textbox(label = "PixelPitch X(m)", placeholder="1e-5")
 
 OpenholoGeneration.light_PixelPitchY = gr.Textbox(label = "PixelPitch Y(m)", placeholder="1e-5")
 
 OpenholoGeneration.light_PixelNumX = gr.Textbox(label = "PixelNum X", placeholder="1920")
 
 OpenholoGeneration.light_PixelNumY = gr.Textbox(label = "PixelNum Y", placeholder="1080")
 
 OpenholoGeneration.light_WaveLength1 = gr.Textbox(label = "WaveLength1(m)", placeholder="638e-9")
 
 OpenholoGeneration.light_WaveLength2 = gr.Textbox(label = "WaveLength2(m)", placeholder="520e-9")
 
 OpenholoGeneration.light_WaveLength3 = gr.Textbox(label = "WaveLength3(m)", placeholder="450e-9")
 
 OpenholoGeneration.lightXmlParing
 
 OpenholoGeneration.lightfile
 
 OpenholoGeneration.lightOutput = gr.Image(label="LightField Bmp")
 
 OpenholoGeneration.lightGen = gr.Button(value = "Generate LightField Hologram")
 
 OpenholoGeneration.lightGenerate
 
 OpenholoGeneration.trimeshxml = gr.File(label="Choose a Triangle Mesh Config (.xml) File to Upload",interactive="True")
 
 OpenholoGeneration.trimeshply = gr.File(label="Choose a Triangle Mesh (*.ply) File to Upload",interactive="True")
 
 OpenholoGeneration.trimeshplyout = gr.Textbox(label="[Warning] Please wait until the size of the Triangle Mesh file to be uploaded is large and displayed in the temporary path in the text box below. The upload is complete when the box below is displayed.")
 
 OpenholoGeneration.trimesh_Scale_X = gr.Textbox(label = "Scale X", placeholder="0.005")
 
 OpenholoGeneration.trimesh_Scale_Y = gr.Textbox(label = "Scale Y", placeholder="0.005")
 
 OpenholoGeneration.trimesh_Scale_Z = gr.Textbox(label = "Scale Z", placeholder="0.005")
 
 OpenholoGeneration.trimesh_LampDirection_X = gr.Textbox(label = "LampDirectionX", placeholder="0")
 
 OpenholoGeneration.trimesh_LampDirection_Y = gr.Textbox(label = "LampDirectionY", placeholder="0.3")
 
 OpenholoGeneration.trimesh_LampDirection_Z = gr.Textbox(label = "LampDirectionZ", placeholder="1")
 
 OpenholoGeneration.trimesh_PixelPitch_X = gr.Textbox(label = "PixelPitch X", placeholder="10e-6")
 
 OpenholoGeneration.trimesh_PixelPitch_Y = gr.Textbox(label = "PixelPitch Y", placeholder="10e-6")
 
 OpenholoGeneration.trimesh_PixelNum_X = gr.Textbox(label = "PixelNum X", placeholder="1920")
 
 OpenholoGeneration.trimesh_PixelNum_Y = gr.Textbox(label = "PixelNum Y", placeholder="1080")
 
 OpenholoGeneration.trimesh_WaveLength_1 = gr.Textbox(label = "WaveLength1", placeholder="638e-9")
 
 OpenholoGeneration.trimesh_WaveLength_2 = gr.Textbox(label = "WaveLength2", placeholder="520e-9")
 
 OpenholoGeneration.trimesh_WaveLength_3 = gr.Textbox(label = "WaveLength3", placeholder="450e-9")
 
 OpenholoGeneration.trimeshOutput = gr.Image(label="Triangle Mesh Bmp")
 
 OpenholoGeneration.trimeshGen = gr.Button(value = "Generate Triangle Mesh Hologram")
 
 OpenholoGeneration.trimeshXmlParing
 
 OpenholoGeneration.trimeshfile
 
 OpenholoGeneration.trimeshGenerate
 
 OpenholoGeneration.wrpxml = gr.File(label="Choose a WRP Config (.xml) File to Upload",interactive="True")
 
 OpenholoGeneration.wrpplyout = gr.Textbox(label="[Warning] Please wait until the size of the ply file to be uploaded is large and displayed in the temporary path in the text box below. The upload is complete when the box below is displayed.")
 
 OpenholoGeneration.wrp_Scale_X = gr.Textbox(label = "Scale X", placeholder="0.0015")
 
 OpenholoGeneration.wrp_Scale_Y = gr.Textbox(label = "Scale Y", placeholder="0.0015")
 
 OpenholoGeneration.wrp_Scale_Z = gr.Textbox(label = "Scale Z", placeholder="0.0015")
 
 OpenholoGeneration.wrp_Distance = gr.Textbox(label = "Distance", placeholder="0.5")
 
 OpenholoGeneration.wrp_NumOf_WRP = gr.Textbox(label = "NumOfWRP", placeholder="1")
 
 OpenholoGeneration.wrp_WRP_Location = gr.Textbox(label = "LocationOfWRP", placeholder="0.003")
 
 OpenholoGeneration.wrp_PixelPitch_X = gr.Textbox(label = "PixelPitch X", placeholder="1e-5")
 
 OpenholoGeneration.wrp_PixelPitch_Y = gr.Textbox(label = "PixelPitch Y", placeholder="1e-5")
 
 OpenholoGeneration.wrp_PixelNum_X = gr.Textbox(label = "PixelNum X", placeholder="1920")
 
 OpenholoGeneration.wrp_PixelNum_Y = gr.Textbox(label = "PixelNum Y", placeholder="1080")
 
 OpenholoGeneration.wrp_WaveLength_1 = gr.Textbox(label = "WaveLength1", placeholder="638e-9")
 
 OpenholoGeneration.wrp_WaveLength_2 = gr.Textbox(label = "WaveLength2", placeholder="520e-9")
 
 OpenholoGeneration.wrp_WaveLength_3 = gr.Textbox(label = "WaveLength3", placeholder="450e-9")
 
 OpenholoGeneration.wrpOutput = gr.Image(label="WRP Bmp")
 
 OpenholoGeneration.wrpGen = gr.Button(value = "Generate WRP Hologram")
 
 OpenholoGeneration.wrpXmlParing
 
 OpenholoGeneration.wrpplyfile
 
 OpenholoGeneration.wrpGenerate
 
 OpenholoGeneration.concurrency_count
 
 OpenholoGeneration.share