almost-working prototype

This commit is contained in:
2022-10-11 15:46:53 -05:00
parent 63eb8bdb85
commit bd3569bace
7 changed files with 183 additions and 74 deletions

View File

@@ -4,5 +4,6 @@
<link rel="app.css">
</head>
<body>
{% block content %}
{% block content required %}
{% endblock %}
</body>

View File

@@ -1,7 +1,38 @@
{% extends "base.html" %}
{% extends "base.jinja2" %}
{% block content %}
<div class="form">
<button onclick="">
</button>
</div>
<form action="/ratio_pyro" method="POST" enctype="multipart/form-data">
<h2>Simple Ratio Pyrometry Interface</h2>
<input type="file" name="file" accept=".png,.jpg,.jpeg" value="Choose Image"/>
<h4>Camera Settings</h4>
<label for="iso">ISO</label>
<input type="number" name="iso" value="2.4"/>
<br>
<label for="i_darkcurrent">I_Darkcurrent</label>
<input type="number" name="i_darkcurrent" value="150.5"/>
<br>
<label for="exposure_time">Exposure Time <i>t</i></label>
<input type="number" name="exposure_time" value="0.5"/>
<br>
<label for="f_stop">F-stop <i>f</i></label>
<input type="number" name="f_stop" value="2.4"/>
<br>
<h4>Temperature Settings</h4>
<label for="min_temp">Min Temp (°C)</label>
<input type="number" name="min_temp" value="60"/>
<br>
<label for="max_temp">Max Temp (°C)</label>
<input type="number" name="max_temp" value="1200"/>
<br>
<br>
<input type="submit" value="Generate Heatmap"/>
</form>
{% endblock %}

57
templates/results.jinja2 Normal file
View File

@@ -0,0 +1,57 @@
{% extends "base.jinja2" %}
{% block content %}
<table class="img-table">
<tr>
<th class="img-table-heading">Input Image</th>
<th class="img-table-heading">Resultant Heatmap</th>
</tr>
<tr>
{# Original image #}
<td>
<img data="{{ img_orig_bytes }}" alt="original image">
</td>
{# Result image #}
<td>
<img data="{{ img_res_bytes }}" alt="result image">
</td>
</tr>
</table>
<h1>{{ img_orig_bytes }}</h1>
<br><br><br>
<table class="legend">
<tr>
<th>Color</th>
<th>Temperature</th>
</tr>
{% for temp, color in legend.items() %}
<tr>
<td class="legend-cell"><div style="width:20px;height:20px;background-color:{{ color }};"></div></td>
<td class="legend-cell">{{ temp }}°C</td>
</tr>
{% endfor %}
</table>
<style>
.img-table {
width: 80%;
}
.img-table-heading {
padding: 4px 10px;
}
.img-table-cell {
padding: 20px 10px;
}
.legend-cell {
padding: 4px 14px;
}
</style>
{% endblock %}