简体   繁体   English

如何在屏幕上快速绘制

[英]How to draw on screen rapidly

I have a sensor which is able to read color value from the screen very fast (within a few milliseconds). 我有一个传感器,可以非常快速地(在几毫秒内)从屏幕上读取颜色值。 And also I have to change 3 colors, red, green, blue, by rotation within a rectangle (not large) on the screen so fast that rectangle will considered white. 而且我还必须通过在屏幕上的矩形(不大)内旋转来更改3种颜色,分别是红色,绿色,蓝色,以至于矩形将被视为白色。 My first question: is it possible? 我的第一个问题:可能吗? Is there any technique allows to fill R,G, and B colors so fast that eye would not be able to determine each separate color, but considered area as a mix? 是否有任何技术可以如此快速地填充R,G和B颜色,以至于眼睛无法确定每种单独的颜色,而是将区域视为混合色? Actually, my monitor refresh rate is 60 Hz, is it enough? 实际上,我的显示器刷新率为60 Hz,足够了吗? I implemented it with C++/Qt/Windows 7, but I see only blinking rectangle on my form. 我用C ++ / Qt / Windows 7实现了它,但是在窗体上仅看到闪烁的矩形。 It should works with any modern video adapter, even built-in. 它应该可以与任何现代视频适配器一起使用,甚至是内置的。

The monitor's refresh rate is 60Hz, so the picture is refreshed once every 1/60th of a second or 0.0167 seconds or every 16ms. 监视器的刷新率为60Hz,因此图像每1/60秒或0.0167秒或每16ms刷新一次。 You didn't specify the sampling rate of the sensor but it sounds like it is significantly faster than your refresh. 您没有指定传感器的采样率,但听起来比刷新快得多。 That means that multiple samples are going to see the same picture. 这意味着多个样本将看到同一张图片。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM