Page 1 of 2

Normbox

PostPosted: Tue May 05, 2020 10:49 pm
by Ketechi
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:

Re: Normbox

PostPosted: Wed May 06, 2020 12:29 am
by antithesis
Thanks for sharing Ketechi.

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

Re: Normbox

PostPosted: Wed May 06, 2020 3:04 am
by bmpt guard
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

Re: Normbox

PostPosted: Wed May 06, 2020 8:45 am
by doko54
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 ?

Re: Normbox

PostPosted: Wed May 06, 2020 10:11 am
by hammer
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 ?

Re: Normbox

PostPosted: Wed May 06, 2020 2:59 pm
by bmpt guard
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

Re: Normbox

PostPosted: Wed May 06, 2020 8:18 pm
by hammer
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

Re: Normbox

PostPosted: Sat May 23, 2020 9:58 am
by hammer
Just wanted to add his tutorial on how to use it if that is unclear :)



And how to implement that into a script


Re: Normbox

PostPosted: Sun Sep 06, 2020 9:07 pm
by gobroncos671
hammer wrote: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


Thanks for this! I was getting that initial error with the original file.

Your version works at first, but after spending more than one minute expanding the box and taking a picture, I receive the following error:

Code: Select all
GCV Error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-k8sx3e60\opencv\modules\imgcodecs\src\loadsave.cpp:738: error: (-215:Assertion failed) !_img.empty() in function 'cv::imwrite'
 
 


Any idea what may be causing this?

Re: Normbox

PostPosted: Sun Feb 14, 2021 1:49 pm
by GrandpaMike
gobroncos671 wrote:
hammer wrote: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


Thanks for this! I was getting that initial error with the original file.

Your version works at first, but after spending more than one minute expanding the box and taking a picture, I receive the following error:

Code: Select all
GCV Error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-k8sx3e60\opencv\modules\imgcodecs\src\loadsave.cpp:738: error: (-215:Assertion failed) !_img.empty() in function 'cv::imwrite'
 
 


Any idea what may be causing this?



you might want to check this out if you still have the error.
https://stackoverflow.com/questions/541 ... cvcvtcolor

I did get the error today trying to save a screenshot..
121Error.JPG
121Error.JPG (62.26 KiB) Viewed 5116 times

the error did not crash the program and i was able to take several still shots after.

Great tutorial definitely got me started with some basic questions i had. I did need to use the modified version but it works great.