Bläddra i källkod

v.0.2.0.9 [heart] ✅ DONE

ypv 1 dag sedan
förälder
incheckning
64cd4e5924
2 ändrade filer med 16 tillägg och 6 borttagningar
  1. 10 5
      ПМ.03.01/4.7.200/002/app.js
  2. 6 1
      ПМ.03.01/4.7.200/002/specification.md

+ 10 - 5
ПМ.03.01/4.7.200/002/app.js

@@ -443,10 +443,15 @@
         if (px < photoFit.x || px >= photoFit.x + photoFit.w || py < photoFit.y || py >= photoFit.y + photoFit.h) continue;
         if (maskData[my * maskW + mx] === 0) continue;
 
-        // Anatomical heat profile: cooler extremities, warmer torso, strongest
-        // local maxima at the head and upper chest. This is not thermometry.
+        // Anatomical heat profile: retain the existing warm head, chest and core,
+        // then add a distinct but smoothly blended maximum over the heart area.
+        // Coordinates are relative to the detected silhouette, not the full photo:
+        // x=0.54 is slightly to the subject's left (viewer-right in a frontal pose),
+        // y=0.40 places the focus in the upper torso. This is an illustration,
+        // not a measurement of real body temperature.
         const head = Math.exp(-((((nx - 0.50) / 0.17) ** 2) + (((ny - 0.105) / 0.10) ** 2)) * 2.0);
         const chest = Math.exp(-((((nx - 0.51) / 0.23) ** 2) + (((ny - 0.36) / 0.20) ** 2)) * 1.65);
+        const heart = Math.exp(-((((nx - 0.54) / 0.115) ** 2) + (((ny - 0.405) / 0.12) ** 2)) * 1.45);
         const core = Math.exp(-((((nx - 0.50) / 0.29) ** 2) + (((ny - 0.43) / 0.34) ** 2)) * 1.25);
         const shoulder = Math.exp(-((((nx - 0.50) / 0.34) ** 2) + (((ny - 0.24) / 0.13) ** 2)) * 1.3);
         const outer = clamp(
@@ -455,9 +460,9 @@
           1
         );
 
-        // Approximate absolute apparent skin temperatures, Kelvin.
-        // Head/chest are hottest; the outer silhouette remains cooler.
-        const temp = 289 + 3 * outer + 5 * core + 11 * head + 10 * chest + 2 * shoulder;
+        // The heart region has the highest model temperature. The broad chest
+        // contribution below keeps a continuous transition into the surrounding torso.
+        const temp = 289 + 3 * outer + 5 * core + 11 * head + 10 * chest + 2 * shoulder + 18 * heart;
         const t = clamp((temp - displayMin) / displaySpan, 0, 1);
         // Slight gamma compression keeps cooler extremities blue/green while
         // allowing the head and chest to reach vivid orange/red values.

+ 6 - 1
ПМ.03.01/4.7.200/002/specification.md

@@ -5,7 +5,12 @@
 
 
 вернемся к тепловизору: поправь так, чтобы после выделения контура на фотографии самой яркой всегда областью было сердце (приблизительно по выделенному силуэту ). Остальные области как и сейчас, но с переходом на область сердца
-v.0.2.0.9 [heart]
+v.0.2.0.9 [heart] ✅ DONE
+Сердце — самая горячая область с выраженным красно-белым центром.
+Вокруг него температура плавно переходит в тёплую область груди.
+Голова сохраняет прежнюю повышенную температуру, но больше не конкурирует с сердцем.
+Конечности и края силуэта остаются холоднее.
+
 
 гораздо лучше, но в центре фигуры есть неокрашиваемые артефакты, скорее всего артефакты сегментации. Их надо убирать, и в окрашивании учитывать только внешний контур.
 v.0.2.0.8 [color_artefacts] ✅ DONE