Jump to content

VEX luminance vs @Cd length, and Max and Min luminance


anicg

Recommended Posts

In the attached file I've calculated the Cd vector length which I was led to believe is the brightness, but then there is luminance function that's gives different values than the Cd length.

Do you know why there is a difference?

In part two of the code I'm trying to find the brightest and the darkest using max(luminance.. and min(luminance ... I don't know how to make it work to get just one value for the max and one value for the min (for all the points).

 

VEX_luminance_vs_Cd_Length.hiplc

luma and Cd length.JPG

Link to comment
Share on other sites

The luminance() function is calculating the perceived brightness. It's weighting each color channel (R, G, B ) differently. 

The min() and max() functions will just return the smallest or highest component of a vector (R, G or B). To get the global maximum and minimum value of an attribute, you would set a detail attribute first and access it in another wrangle:

 

Edited by konstantin magnus
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...