How to read a single pixel value from cops?
644
2
3
galagast
Member
266 posts
Joined:
Offline
June 6, 2025 4:12 a.m.
Anyone knows if the
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 - June 6, 2025 04:13:10
Attachments:
bItyP9c4DU.png (55.5 KB)
Aug. 28, 2025 4:16 p.m.
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
Oct. 3, 2025 9:33 p.m.
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 - Oct. 3, 2025 23:02:13