Skip to content

Commit

Permalink
jch fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
talonchandler committed Oct 19, 2024
1 parent 784eaec commit 5365abb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions recOrder/io/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,21 @@ def ret_ori_overlay(
overlay_final = np.zeros_like(retardance)

if cmap == "JCh":
J = ret_
C = np.ones_like(J) * 60
J_MAX = 65
C_MAX = 60

J = (ret_ / ret_max) * J_MAX
C = np.ones_like(J) * C_MAX
C[ret_ < ret_min] = 0
h = ori_

JCh = np.stack((J, C, h), axis=-1)
JCh_rgb = cspace_convert(JCh, "JCh", "sRGB1")
JCh_rgb = cspace_convert(JCh, "JCh", "sRGB255")

JCh_rgb[JCh_rgb < 0] = 0
JCh_rgb[JCh_rgb > 1] = 1
JCh_rgb[JCh_rgb > 255] = 255

overlay_final = JCh_rgb
overlay_final = JCh_rgb.astype(np.uint8)
elif cmap == "HSV":
I_hsv = np.moveaxis(
np.stack(
Expand Down

0 comments on commit 5365abb

Please sign in to comment.