Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本上,
框架继续前进。那么,如何从前一帧和当前帧连续读取/取回总白色像素的值?
谢谢。
您需要持有具有 prev 值的成员。假设readPixel()函数读取总的白色值,curr是当前值,prev是前一个值。这是示例伪代码:
readPixel()
curr
prev
prev = curr = readPixel; //avoid division by zero for(;;) { curr = readPixel(); value = curr / prev; prev = curr; }