Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Official news and announcements from the ConsoleTuner team.

Re: Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Postby Scachi » Fri Apr 30, 2021 3:24 pm

one way to convert something to greyscale:
grey = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

when you use image template matching you may need to use the same image format/depth to be able to use the functions, something like that may help then
fakecolor = cv2.cvtColor(grey, cv2.COLOR_BGR2RGB)
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Postby eom85 » Tue May 04, 2021 9:07 am

Any ideas how to reduce the lag between PS5 and Gtuner Preview? For me, the only way to reduce it, is by lowering the resolution of the input.
Once the signal is there, all of my script operations might reduce frame rate, but have no effect on the actual latency... meaning, even with the simplest script where I just pass through the frame, there is latency on higher resolutions.

I thought about cropping a section of the high resolution frame BEFORE it enters my computer, essentially getting high resolution on only a fraction of the screen. Is that possible?

Any other ideas?
User avatar
eom85
First Sergeant
First Sergeant
 
Posts: 65
Joined: Wed Jun 21, 2017 7:51 pm

Re: Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Postby Scachi » Tue May 04, 2021 9:57 am

no idea how good you are on guessing small delay times, hard to tell what latency I have between video out and captured video in / gtuner preview..no idea how much milliseconds that is.
there is always some latency..the lowest latency capture devices are pci-e I think.
Not sure if usb 2 and usb3 makes a differences. your card seems to be usb 2.0
For gtuner IV it also depends a lot on your hardware cpu.
using the "video input test" script is as fast/small delay as it can get by default as it only returns the frame without modifying it.

Did you try using a different driver in the "Video Input Configuration" ?
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Postby eom85 » Tue May 04, 2021 2:23 pm

Ok, so you are saying the Video Input Test is the absolute lowest latency I can get for my hardware setup. Seems reasonable, yet disappointing :roll:

I tried all of them, but AVFoundation is the only one that works.
BTW, I’m running an Aver Mini and an old MacBook Pro from 2010.

I really hoped there is a way to trim the input on the capture card before passing it through to my computer. The config window kind of gave that idea.
User avatar
eom85
First Sergeant
First Sergeant
 
Posts: 65
Joined: Wed Jun 21, 2017 7:51 pm

Re: Gtuner IV 1.07 BETA (Scriptable Computer Vision Interfac

Postby Until Asleep » Tue Feb 08, 2022 6:44 pm

First of all, good afternoon and sorry if I don't explain myself very well but English is not my native language.

After a while using your gamepacks and scripts, which by the way seem fabulous to me. I have ventured to tinker a bit with the GPC based on your contributions and I am going slowly but learning a little more every day.

The case for which I ask your help is to make a "J2Kbr" contribution work, specifically this one:

J2Kbr wrote:For a quick test, I used the R-301 results and -omg- it compensates the vertical and horizontal recoil unbelievable better than I was expecting. There are still a very minor movement, but this is due the game randomness. Here is the Titan Two GPC code I use for the test:
Code: Select all
#define h03(a)  ((a*9.00)/(SENSITIVITY))
#define v03(a)  ((a*11.50)/(SENSITIVITY*YX_RATIO))
const fix32 dx03[28] = { h03( -6.67), h03( +0.83), h03( -5.00), h03( +0.83), h03( -0.50), h03( -0.33), h03( -3.67), h03( -4.67), h03( -3.83), h03( -5.33), h03( -0.50), h03( +5.00), h03( +5.83), h03( +5.50), h03( +5.50), h03( +5.67), h03( +4.67), h03( +1.17), h03( -3.33), h03( -5.67), h03( -6.50), h03( -7.83), h03( -4.67), h03( -6.67), h03( -2.17), h03( -0.33), h03( -0.17), h03(0.0) };
const fix32 dy03[28] = { v03(+22.50), v03(+14.00), v03(+14.00), v03(+13.17), v03( +9.83), v03( +4.83), v03( +4.17), v03( +2.83), v03( +1.17), v03( -0.17), v03( +5.83), v03( +5.67), v03( +3.00), v03( +2.17), v03( +3.67), v03( -1.17), v03( +1.00), v03( +5.50), v03( +6.50), v03( +3.00), v03( -2.33), v03( +0.50), v03( -3.17), v03( -3.17), v03( -0.33), v03( +4.17), v03( +4.33), v03(0.0) };
mxyconverter_hoffset((int16)(dx03[i]/bcomp[barrel]));
mxyconverter_voffset((int16)(dy03[i]/bcomp[barrel]));


I can't get it to work as it is, it gives me a lot of failures.

Could someone guide me on what would be the correct way to try it on a Titan 2?

Thank you all for your work
User avatar
Until Asleep
Sergeant
Sergeant
 
Posts: 7
Joined: Tue Feb 08, 2022 6:23 pm

Re: Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Postby IPlayCOD » Mon Mar 21, 2022 8:59 am

how to go from capture card fast?

afaik, the screen has to have a starting position, travels through the screen, then goes to the ending position.

then it goes to the screen capture which does this,

then it goes to what reads the capture card, three time going from start, middle, end of screen.

A 60th of second is about 0.0166666667 seconds, or 16.6666667 milliseconds, or 17 ms.

so 17ms times 3 is the fastest to travel from the source to the capture to the final video. 17*3 = 51ms
User avatar
IPlayCOD
Private
Private
 
Posts: 1
Joined: Mon Mar 21, 2022 8:53 am

Re: Gtuner IV 1.07 PUBLIC RELEASE: Computer Vision

Postby Mad » Mon Mar 21, 2022 8:53 pm

IPlayCOD wrote:how to go from capture card fast?

You can't eliminate the capture card latency. You'd need to just not use a capture card and use display capture on the same PC.

Here's a list of capture cards and latency times (only some are UVC compatible so make sure to check that before picking anything from the list)
cc.jpg
cc.jpg (476.48 KiB) Viewed 4780 times
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Previous

Return to News and Announcements

Who is online

Users browsing this forum: No registered users and 71 guests