DeepGTAV icon indicating copy to clipboard operation
DeepGTAV copied to clipboard

captured screen color changes

Open jackspp opened this issue 8 years ago • 6 comments

captured screen color changes and looks like img1: also, when i set gtav to fullscreen, it capture only black: like img2: img_62 img_50

jackspp avatar Nov 12 '17 07:11 jackspp

hope you could offer some suggestion to solve this problem, thanks!

jackspp avatar Nov 12 '17 07:11 jackspp

i am running this on window8

jackspp avatar Nov 12 '17 07:11 jackspp

also, if i change frame to other values, it would look like this img_0

jackspp avatar Nov 12 '17 07:11 jackspp

My guess is that, the first problem is because the channel order of RGB is maybe RGB or BGR. So you can try to alternate the channel order of collected images and see the changes. For the second problem, the screenshot method of repo owner use is to capture the window of desktop by win32 api. However, in full screen mode, the api are not working. You can adjust to window mode( borderless) and it will work fine.

fuenwang avatar Nov 30 '17 19:11 fuenwang

In GTAV menu/settings/display you can set the display to borderless window with the dimensions of your display/GPU. So you can get effective full screen and still capture images.

If you change your capture frame size you will need to also change the size values if it is processed with frame2numpy to the same values otherwise you get garbled images.

Sometimes GTAV does strange things with colour but if you get it consistently then the RGB BGR issue mentioned above might be to blame.

IanKirwan avatar Jan 06 '18 18:01 IanKirwan

do remember, matplotlib is using RGB, and opencv is using BGR for plotting the image, you can use opencv to convert it easily.

xiaoli-chen avatar Jan 13 '18 03:01 xiaoli-chen