Computer Vision Scripting Help
6 posts
• Page 1 of 1
Computer Vision Scripting Help
How I would go about making a script that can scan the video output for a specific pixel or picture? Or a script that looks at a specific area of the video output for that pixel or picture? I'm a bit new to using the computer vision, I have it set up where I can see the video output using my Elgato HD60S in GTuner, but I don't know how to use that in any scripts. I believe its the GCV scripts that I need to learn how to make.
-
kjlivezey2000 - Staff Sergeant
- Posts: 10
- Joined: Wed Jan 29, 2020 10:16 pm
Re: Computer Vision Scripting Help
Check out the existing scripts in the online resource, you can find them in the "Misc" section.
Blank GCV script example:
gcv_ready() https://www.consoletuner.com/wiki/index ... :gcv_ready
gcv_read() https://www.consoletuner.com/wiki/index ... 2:gcv_read
Blank GCV script example:
- Code: Select all
import os
import cv2
class GCVWorker:
def __init__(self, width, height):
os.chdir(os.path.dirname(__file__))
if width != 1920 or height != 1080:
print("WARNING: This GCV script is optimized for 1920x1080 resolution")
self.gcvdata = bytearray([0xFF, 0xFF, 0xFF, 0xFF, 0xFF])
def __del__(self):
del self.gcvdata
def process(self, frame):
return (frame, None)
gcv_ready() https://www.consoletuner.com/wiki/index ... :gcv_ready
gcv_read() https://www.consoletuner.com/wiki/index ... 2:gcv_read
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Computer Vision Scripting Help
So would I put this code in a GPC script? Or do I need to open a GCV script? I'm not sure how to do that if that's the case.
-
kjlivezey2000 - Staff Sergeant
- Posts: 10
- Joined: Wed Jan 29, 2020 10:16 pm
Re: Computer Vision Scripting Help
Put it into a gcv script
-
Chaka - Master Sergeant
- Posts: 36
- Joined: Tue Feb 05, 2019 4:18 am
Re: Computer Vision Scripting Help
How does the gsv script look like with the gsv file?
Also how to I select the script in the computer vision tab drop down?
Doesn't seem to be there?
Also how to I select the script in the computer vision tab drop down?
Doesn't seem to be there?
-
xnorsis - Private First Class
- Posts: 2
- Joined: Mon Jul 19, 2021 5:03 am
Re: Computer Vision Scripting Help
xnorsis wrote:Also how to I select the script in the computer vision tab drop down?
Doesn't seem to be there?
You need to save the script in a folder and set it as your working directory.
step 4: viewtopic.php?f=15&t=15147
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
6 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: midg3t2 and 152 guests