Normbox

GCV scripting for Gtuner IV and Titan Two. Configuration, examples, questions.

Normbox

Postby Ketechi » Tue May 05, 2020 10:49 pm

Hi everyone,

Today I bring you a new tool that can facilitate the use of Norm. I call this script/tool Normbox. the script allows you to take the image of the specific area you are trying to compare with Norm and also it will provide you a text file that contains the coordinates so you don’t have to find them yourself.

This is the controller functionalities:
RS/R3: Will freeze/unfreeze the frame to make it easier to adjust the box.
LS/L3: Will extract the image located on the inside of the box.
LB/L1: Will change the x and y index, for example, X1 Y1 to X2 Y2.
D-pad UP: Will move the selected Y index up.
D-pad DOWN: Will move the selected Y index down.
D-pad LEFT: Will move the selected X index left.
D-pad RIGHT: Will move the selected X index right.

Here is a tutorial I made on how to use this script:
[YouTube]https://youtu.be/34cgrzyaOzE[/YouTube]

Here you can find the script:
https://pastebin.com/GkHRZD1n

I hope this script helps you guys,
Stay safe :smile0201:
User avatar
Ketechi
Staff Sergeant
Staff Sergeant
 
Posts: 13
Joined: Thu Feb 22, 2018 8:13 pm

Re: Normbox

Postby antithesis » Wed May 06, 2020 12:29 am

Thanks for sharing Ketechi.

For those of us unfamiliar with CV, what is Norm?
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1810
Joined: Sat May 28, 2016 10:45 pm

Re: Normbox

Postby norge1 » Wed May 06, 2020 3:04 am

antithesis wrote:Thanks for sharing Ketechi.

For those of us unfamiliar with CV, what is Norm?

well from watching the youtube videos he posted in discord, it looks like "visual gpc for gcv" on gtuner iv. best way to explain in my mind.
but why i get error i dont know if anyone knows why i got error when trying to run norm let me know. thanks
User avatar
norge1
Command Sergeant Major
Command Sergeant Major
 
Posts: 137
Joined: Thu May 12, 2016 9:33 pm

Re: Normbox

Postby doko54 » Wed May 06, 2020 8:45 am

Hi ketechi ,
we got these type of error at launch the script
GCV Error: ('invalid decimal literal', ('', 6, 7, 'from 1___normbox import GCVWorker'))
GCV Error: SyntaxError: invalid decimal literal (, line 6)

Did you know how to fix them and from wheere it provide ?
User avatar
doko54
Private First Class
Private First Class
 
Posts: 2
Joined: Thu Apr 23, 2020 12:39 pm

Re: Normbox

Postby hammer » Wed May 06, 2020 10:11 am

Rename the file to normbox.py
Delete the 1 and the _ infront.
doko54 wrote:Hi ketechi ,
we got these type of error at launch the script
GCV Error: ('invalid decimal literal', ('', 6, 7, 'from 1___normbox import GCVWorker'))
GCV Error: SyntaxError: invalid decimal literal (, line 6)

Did you know how to fix them and from wheere it provide ?
User avatar
hammer
Sergeant Major
Sergeant Major
 
Posts: 104
Joined: Sun Sep 30, 2018 1:36 pm
Location: Germany

Re: Normbox

Postby norge1 » Wed May 06, 2020 2:59 pm

hammer wrote:Rename the file to normbox.py
Delete the 1 and the _ infront.
doko54 wrote:Hi ketechi ,
we got these type of error at launch the script
GCV Error: ('invalid decimal literal', ('', 6, 7, 'from 1___normbox import GCVWorker'))
GCV Error: SyntaxError: invalid decimal literal (, line 6)

Did you know how to fix them and from wheere it provide ?

ok i did what you said to fix, but now got these errors:
GCV Error: cannot reshape array of size 8294400 into shape (27,25,4)
Computer Vision: ERROR: Gpython process exited with error code 121

tried fixing just coping raw from pastebin to py normbox.
seems the script works in null, but when trying to run script on dual monitor setup it doesnt work
User avatar
norge1
Command Sergeant Major
Command Sergeant Major
 
Posts: 137
Joined: Thu May 12, 2016 9:33 pm

Re: Normbox

Postby hammer » Wed May 06, 2020 8:18 pm

Full credit to DontAtMe or ME on discord!!

This error came up on some people pc's and after some changes it works now, at least for me ;P
Code: Select all
GCV Error: cannot reshape array of size 8294400 into shape (27,25,4)
Computer Vision: ERROR: Gpython process exited with error code 121

This was related to:
Code: Select all
self.w = self.x2 - self.x1
self.h = self.y2 - self.y1

I only changed the font size a bit to make it more clear.

EDIT: This doesnt mean that Ketechi's original Pastebin version dont work in general!!!
People told me that it worked out of the box
Attachments
normbox.rar
(1.53 KiB) Downloaded 10 times
User avatar
hammer
Sergeant Major
Sergeant Major
 
Posts: 104
Joined: Sun Sep 30, 2018 1:36 pm
Location: Germany

Re: Normbox

Postby hammer » Sat May 23, 2020 9:58 am

Just wanted to add his tutorial on how to use it if that is unclear :)



And how to implement that into a script

User avatar
hammer
Sergeant Major
Sergeant Major
 
Posts: 104
Joined: Sun Sep 30, 2018 1:36 pm
Location: Germany


Return to Gtuner Computer Vision

Who is online

Users browsing this forum: No registered users and 9 guests