Computer Vision and Titan Two

Gtuner IV general support. Operation, questions, updates, feature request.

Computer Vision and Titan Two

Postby xnorsis » Fri Jul 23, 2021 5:07 pm

I just received my Titan Two and would like to do some basic computer vision projects.
I understand that there are working examples in Apex and COD but I would like to do a simple version than those.

Currently I have an HD60 S+ as the capture device. Checked that I have video working from Nintendo Switch as my target console.
I followed the instructions to install python, opencv and pywin32 and have all green check marks for PATH correct.

I created a simple computer vision script via 'New GSV Script' that puts a string 'Hello World' on the frame.

Code looks like this:

Code: Select all
 
import os
import cv2
#import gtuner
 
class GCVWorker:
    def __init__(self, width, height):
        os.chdir(os.path.dirname(__file__))
        self.gcvdata = bytearray([0x00])
 
    def __del__(self):
        del self.gcvdata
 
    def process(self, frame):
        frame = cv2.putText(frame, "Hello World", (20, 120), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 2, cv2.LINE_AA)
        return (frame, None)
 


Then I press the play button on 'GPC Script IDE' and open 'Computer Vision' tab and press 'Play'
But I don't see any changes to the frame?

Also as a side note I had to comment out the 'import gtuner' because I'm not sure how to install that? Is that a separate download to python module or do I have to use pip to install gtuner?
User avatar
xnorsis
Private First Class
Private First Class
 
Posts: 2
Joined: Mon Jul 19, 2021 5:03 am

Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 66 guests