Browse Source

hsv image inclusion

new-sep-loss
Michael Pilosov 10 months ago
parent
commit
1f96c65b21
  1. BIN
      hsv.png
  2. 2
      hsv.py
  3. 7
      out/index.html

BIN
hsv.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 329 KiB

2
hsv.py

@ -8,7 +8,7 @@ if __name__ == "__main__":
rgb_tensor, _ = extract_colors()
xkcd_rgb = rgb_tensor.numpy()
xkcd_hsv = rgb_to_hsv(xkcd_rgb)
plot_preds(xkcd_hsv[:, 0], fname="hsv")
plot_preds(xkcd_hsv[:, 0], fname="hsv", roll=True)
rgb = np.eye(3)
print("Pure RGB in Hue-Space:")
print(rgb_to_hsv(rgb)[:, 0])

7
out/index.html

@ -73,7 +73,12 @@
var gallery = document.getElementById('gallery');
for (var i = 0; i < 100; i++) { // Changed from i <= 100 to i < 100
let imageName = 'v' + i + '.png';
let imageName;
if (i == 21) {
imageName = 'hsv.png';
} else {
imageName = 'v' + i + '.png';
}
let img = document.createElement('img');
img.src = imageName;
img.onerror = function () { this.style.display = 'none'; };

Loading…
Cancel
Save