Python code for creation of an average image from the multiple facial heat maps
Description
- File "dr_nauber_mean_heat_map_add_on.py" : a Python script (add-on) specifically designed to run within Blender's environment. Python is Blender's scripting language, enabling custom functionalities like this one, which processes heat map images, calculates their average, and integrates the result into Blender's 3D interface. - File "step_by_step_add-on.mp4": screen-recorded video tutorial demonstrating the installation and usage of the add-on (from Step 4 in the instructions below). Instructions: Step 1: Download and Install Blender 2.9. It´s advisable to use the OrtogOnBlender installer, since it contains all the libraries necessary to run the add-on. Windows: https://www.ciceromoraes.com.br/doc/pt_br/OrtogOnBlender/Instalacao_Windows.html Mac OS: https://www.ciceromoraes.com.br/doc/pt_br/OrtogOnBlender/Instalacao_MacOSX.html Linux: https://www.ciceromoraes.com.br/doc/pt_br/OrtogOnBlender/Instalacao_Linux.html Step 2: Obtain the Add-on File 1. Download the file "dr_nauber_mean_heat_map_add_on.py" provided by in this repository. 2. Save this file in a known location, such as your Desktop or Downloads folder. Step 3: Install the Add-on in Blender 1. Open Blender . 2. Go to Edit > Preferences from the top menu. 3. In the Preferences window, click on Add-ons in the left sidebar. 4. Click Install… in the top-right corner. 5. Navigate to the location where you saved the "dr_nauber_mean_heat_map_add_on.py" file. Select the file and click Install Add-on . 6. After installation, find the add-on in the list (search for "Mean Heat Map" if needed). 7. Check the box next to the add-on name to enable it. If necessary, click Save Preferences to make it permanent. Step 4: Set Up Your Images Directory 1. Prepare a folder containing all the heat map images you want to process. - Ensure the images are in a supported format (e.g., `.png` or `.jpg`). - Keep all images in the same resolution for the best results (or the add-on will resize them automatically). Step 5: Use the Add-on 1. In Blender, ensure you're in the 3D Viewport workspace. 2. Locate the "Mean Heat Map" panel: - Press `N` to open the right-hand toolbar in the 3D Viewport. - Click on the Image Processor tab. 3. In the panel: - Paste the folder path from Step 4 into the Directory Path field. - Click the Process Images button. Step 6: Generate the Mean Image 1. The add-on will: - Calculate the average of all the images in the folder. - Save the result as `average_image.png` in the same folder. 2. A message box will confirm the success and the location of the saved image. Step 7: View the Average Image in Blender 1. The add-on automatically creates a plane in the Blender scene, applying the average image as a texture. 2. Press `1` on the numpad to view the plane from the front. 3. Use the mouse scroll wheel to zoom in or out as needed. The resulting image is saved as "average_image.png" in the same folder.