How to read a single pixel value from cops?

   1275   3   4
User Avatar
Member
267 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
107 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
User Avatar
スタッフ
116 posts
Joined: 1月 2024
オフライン
https://www.sidefx.com/forum/topic/102699/?page=1#post-452013 [www.sidefx.com]

Here's another thread with a bit more explanation on this
  • Quick Links