How to read a single pixel value from cops?

   603   2   3
User Avatar
Member
266 posts
Joined:
オフライン
Anyone knows if the
tex/texni/pic/picni
expressions are working with copernicus?

I'm trying to read a single pixel from a Statistics COP and use that value on a parameter.
Edited by galagast - 2025年6月6日 04:13:10

Attachments:
bItyP9c4DU.png (55.5 KB)

User Avatar
Member
104 posts
Joined:
オフライン
I second this question! I've tried to create spare inputs on other nodes and reference those with expressions, but no luck. So what is the correct way to use the statistics node?
Thanks

Dag
User Avatar
Member
5 posts
Joined: 7月 2017
オフライン
Hey, I faced the same situation today so I wrote a simple openCL snippet to remap it using the min and max value from the Statistics COP.

#bind layer src float
#bind layer layerMin float
#bind layer layerMax float
#bind layer !&remapped

@KERNEL
{
    float norm = (@src - @layerMin) / (@layerMax - @layerMin);
    @remapped.set(norm);
}

Just need to plug your source, your min then your max layer in the openCL COP after setting the binds.
Hope that helps!
Cheers
Edited by tbattistetti - 2025年10月3日 23:02:13
  • Quick Links