How to detect active weapon in Pubg using CV?

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

How to detect active weapon in Pubg using CV?

Postby Tahsin » Wed Jul 21, 2021 3:37 pm

Hi
i've just asked in my preview thread to help me finding a CV script for Pubg but no one respond to me
so i try to build my own script but i need your help
im trying to detect active weapons in Pubg but i don't know how to use the code in CV
can someone write me example ore a basic code to use
thank you :smile0201:
User avatar
Tahsin
Sergeant Major
Sergeant Major
 
Posts: 100
Joined: Wed May 15, 2019 7:57 am

Re: How to detect active weapon in Pubg using CV?

Postby Tahsin » Wed Jul 21, 2021 5:21 pm

Why no one respond to me ?
did you make the Computer Vision only for Apex Legends ? there are other games needs scripts not all gamers plays Apex Legends
so why we don't find any script for other games after one year of CV release is is dificault to make a script ?
if you try to sell your scripts just tell me i will buy it so just leave a comment let me know what is the problem
User avatar
Tahsin
Sergeant Major
Sergeant Major
 
Posts: 100
Joined: Wed May 15, 2019 7:57 am

Re: How to detect active weapon in Pubg using CV?

Postby Scachi » Wed Jul 21, 2021 6:28 pm

Depending on the game, its not easy at all to detect the weapons.
The HUD in Apex Legends is full color, no background shining through. And the weapon text is shown all the time on the HUD. This makes it easy to detect the weapon in use.

Pubg has transparent HUD so the color of the weapons shown is different depending on the current background, no weapon text shown, that makes it hard to detect the weapon in use via the normal HUD.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: How to detect active weapon in Pubg using CV?

Postby Tahsin » Wed Jul 21, 2021 8:41 pm

Thanks for the comment Schachi
but you can detect active weapon it's white color you can detect weapon using object tracking
using weapon images the selected weapon is white and the other on is grey look at image :)
Attachments
Pubg1.PNG
Pubg1.PNG (81.25 KiB) Viewed 1677 times
User avatar
Tahsin
Sergeant Major
Sergeant Major
 
Posts: 100
Joined: Wed May 15, 2019 7:57 am

Re: How to detect active weapon in Pubg using CV?

Postby Scachi » Wed Jul 21, 2021 9:48 pm

It might be red too when its out of ammo.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: How to detect active weapon in Pubg using CV?

Postby Tahsin » Wed Jul 21, 2021 10:09 pm

Scachi wrote:It might be red too when its out of ammo.

I agree but you don't need antirecoil when your weapon is out of ammo
so when the weapon color back to white it while be detected again
:smile0201:
User avatar
Tahsin
Sergeant Major
Sergeant Major
 
Posts: 100
Joined: Wed May 15, 2019 7:57 am

Re: How to detect active weapon in Pubg using CV?

Postby Scachi » Thu Jul 22, 2021 5:09 am

Do you want to check for the active weapon slot only (primary/secondary) or identify the weapon too ?
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: How to detect active weapon in Pubg using CV?

Postby Tahsin » Thu Jul 22, 2021 8:31 am

Scachi wrote:Do you want to check for the active weapon slot only (primary/secondary) or identify the weapon too ?

Iwant to identify only the active weapon for example if i have to weapon it while detect only active weapon
But if i change from primary to secondary it while detect the secondary too
Édite:
I want to identify the weapon name so i can make antirecoil for every weapon
User avatar
Tahsin
Sergeant Major
Sergeant Major
 
Posts: 100
Joined: Wed May 15, 2019 7:57 am

Re: How to detect active weapon in Pubg using CV?

Postby Tahsin » Wed Jul 28, 2021 3:02 pm

Is there any news are you working on this script ?

@Scachi
Thanks in advance
User avatar
Tahsin
Sergeant Major
Sergeant Major
 
Posts: 100
Joined: Wed May 15, 2019 7:57 am

Re: How to detect active weapon in Pubg using CV?

Postby Scachi » Sat Jul 31, 2021 8:57 pm

No, I don't work on this script as its a lot of work for an unknown result. It may not work reliable at all at the end as I said the background of the hud where the weapon image is shown needs to be fully opaque for fast, simple and reliable detection.
Pickup the biggest weapon in game as all weapon images to compare should have the same width and height.
Now compare that rectangle area with the same area in your current screenshot.
you will see the background changes it colors depending on where you do the screenshot.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Next

Return to Gtuner Computer Vision

Who is online

Users browsing this forum: No registered users and 49 guests