Matlab_1.6.0
Parametric pinna model (PPM) - MATLAB interface
Author: Florian Pausch (2023)
Versions and contributors:
0.8 and above: Florian Pausch (2023)
0.7 and below: Oscar Jones, Mantas Tamulionis (2021)
Current version:
1.6.0 (release)
Added README.md, CITATION.cff, and EUPL-1.2 license.
OVERVIEW
-
demo_ppm
MATLAB script to demonstrate the functionality of the interface to the PPM (single-parameter and multiple-parameter input), including bi-directional communication with Blender via Python API -
Main functions:
-
ppm_initialize()
- Initialize the PPM structure array
- Optionally clean up previous data in result directory
-
ppm_get_values()
- Obtain the parameter values from the PPM contained in the Blender file to be modified, as specified in the PPM structure array
- Return a subset of parameter values as per 'type', 'name', 'axis'
- Save the comma-separated parameter set as
txt
file - Optionally render the PPM as point cloud (
ply
file) or mesh (stl
file)
-
ppm_set_values()
Set the parameter values of the PPM contained in the Blender file to be modified- Independently select and modify parameters via 'type'/'name'/'axis'
- Use cell-array input to select and modify multiple parameters simultaneously
- Specify the rotation of PPM parameters via Euler angles
- itr=1: Change the selected parameter values only once as per ppm.modify.instruction_mode
- itr>1: Change itr neigboring values in steps of range/itr in a range of (+/- range/2) symmetric around val
- sample_start_idx: File-name index. If itr>1 the exported or rendered files start at this index, which is incremented
- Export the PPM as point cloud (
ply
file) - Export the PPM as mesh (
stl
file) - Render the PPM as image (
png
image) - Render rendered image's depth information as
png
andexr
images (with control of depth-map range) - Manually set the camera pose when rendering the PPM
- Automatically set the camera rotation to point at a specified reference point cam_loc_ref before rendering
-
ppm_evaluate()
Evaluate the PPM mesh against a target mesh in terms of the minimum pointwise distance for two directions- Only for single-parameter input in
ppm_set_values()
: Plot parameter value per iteration (ppm.modify.itr) - Plot modeled point cloud vs. target point cloud
- Plot histogram of minimum pointwise distance for direction 1 (P -> PPM, Q -> Target)
- If ppm.modify.itr > 1 the parameter value is set to the one resulting in the minimum mean minimum pointwise distance (for the direction with the higher supremum) across iterations
- Only for single-parameter input in
-
ppm_evaluate_multiple_meshes
MATLAB script to compare multiple PPM meshes to the corresponding target meshes and evaluate their geometric fit in terms of the Hausdorff distance -
ppm_test
MATLAB script for comprehensive tests ofppm_initialize()
,ppm_get_values()
,ppm_set_values()
(single-parameter and multiple-parameter inputs), andppm_evaluate()
COMPATIBILITY
- Versions 1.1.0 and above only work with the Blender model ARI_PPM_v1 (armature and object definitions), see
config/parameter_defaults_v1.mat
andconfig/shape_key_limits_v1.mat
. - Version 1.6.0 requires the current Python scripts
python/get_values_and_export_mesh_v1_6_0.py
andpython/set_values_and_export_mesh_v1_6_0.py
RELEASE NOTES
-
python/get_values_and_export_mesh_v1_6_0.py
:- BUILD: renamed from
python/get_values_and_export_mesh_v1_5_0.py
(now obsolete) - DOCS: changed function description
- BUILD: renamed from
-
python/set_values_and_export_mesh_v1_6_0.py
:- BUILD: renamed from
python/set_values_and_export_mesh_v1_5_0.py
(now obsolete) - DOCS: changed function description
- BUILD: renamed from
-
ppm_demo
:- FEAT: added option 'auto_correct' to input parameters of ppm_set_values()
- FEAT: added 'shade_smooth' input parameter when calling ppm_set_values() for demonstration purposes
- BUILD: now calls
ppm_plot_distance()
instead ofppm_plot_hd()
- DOCS: added latest PPM-related publication
- DOCS: updated description of the script
-
ppm_initialize()
:- FIX: extended cleanup to remove stl files
- FIX: changed command for deleting 'blender_render.log'
- FIX: now paths may contain spaces
- DOCS: changed function description and some comments
-
ppm_get_values()
:- BUILD: now calls
python/get_values_and_export_mesh_v1_6_0.py
- FIX: now paths may contain spaces
- DOCS: updated function description and some comments
- BUILD: now calls
-
ppm_set_values()
:- FEAT: added 'shade_smooth' to smooth mesh faces to make rendered images more pleasing
- FIX: now paths may contain spaces
- FIX: added 'sample_start_idx' when calling
ppm_get_values()
withinppm_set_values()
for correct naming of result files, in caseppm_get_values()
was not called before running the latter function - DOCS: updated function description
-
ppm_modify_parameter_values()
:- BUILD: changed parameter sets and cam-related settings are now saved in the sub-folders 'parameters' and 'cam', respectively, in the result folder
- BUILD: accounted for file-name start idx of the exported files
-
ppm_blender_execute()
:- BUILD: now calls
python/set_values_and_export_mesh_v1_6_0.py
- FIX: now paths may contain spaces
- BUILD: now calls
-
ppm_evaluate()
:- BUILD: evaluation now accounts for direction-dependent distance metrics, i.e. directed pointwise minimum distances of direction 1 and 2, and Hausdorff distance
- BUILD: added path error when target mesh does not exist
- BUILD: replaced function call
ppm_plot_hd()
byppm_plot_distance()
- BUILD: removed unwanted printed output
- FIX: fixed dimension of ppm.evaluate.hd for itr>1
- FIX: now paths may contain spaces
- STYLE: freeze aspect ratio when rotating
- STYLE: print geometric errors in table format
- DOCS: corrected axis labels and printed output
- DOCS: updated function description and changed some comments
-
ppm_plot_distance()
:- BUILD: renamed from
ppm_plot_hd()
- BUILD: now plots direction-dependent distance, i.e. directed pointwise minimum distances of direction 1
- BUILD: renamed from
-
ppm_test
- TEST: added tic/toc
- DOCS: added diary
- DOCS: updated function description
- BUILD: moved to folder test