RGB Mat always over 100

asked 2015-09-05 14:35:33 -0600

nbun gravatar image

I'm writing a program that test for display lag. I have a variables that tell me the rgb values of a pixel so I use System.nanotime with and an empty while loop that ends when the rgb variables reaches 100, combined with the subtraction of another System.nanotimeafter the loop to get the amount of time for a color to show up (second System.nanotime - first System.nanotime). I get the time in nanoseconds and divide it by 1,000,000 so I can get the time in milliseconds, the issue is that rgb is alway over 100 when i have it right up to the display, even when a white square is on the display. When I back the camera about a foot away the rgb seem normal. Is there a way to make the rgb values normal when it is close up to the display?

edit retag flag offensive close merge delete

Comments

I'm not sure to understand : when your camera is far from screen you can measure value greater than 100 and when camera is closer to screen you cannot measure value greater than 100. Is it ?

If yes :

When your camera is closer your surface focus is wrong and energy comming from your screen pixel is behind focal plan and hence energy is sparse over many camera pixels and you've got less energy...

LBerger gravatar imageLBerger ( 2015-09-05 15:45:43 -0600 )edit

Its the other way around, when my camera is far from screen the rgb are correct, but when its right up to it its more than 100 even if the screen is black.

nbun gravatar imagenbun ( 2015-09-05 16:10:39 -0600 )edit
1

Sorry I don't see "over 100". In that case I think your camera have got auto gain then as your picture is dark everywhere automatic system adjust a value (128 may be) I think you've got some ambient light. This system uses a a small region for gain adjustment..

I don't think your problem it's an opencv problem but an optical problem. Another problem is that you're measuring not display lag but lag of camera and display.

LBerger gravatar imageLBerger ( 2015-09-06 02:27:48 -0600 )edit