need gelp to change my pthon image recognition code

I need help to improve the speed of code. Basically it need to recognize a piece of image (30x50) in specific screen coordinates and then continue the code that move the mouse without restarting the agachar() over and over again.

In the start of loop it need to recognize the image once and then continue ultil I realead the buttons and press again.

code example:

def lmb_down(): # Returns true if the left mouse button is pressed

lmb_state = [login to view URL](0x01)

return lmb_state < 0

def rmb_down(): # Returns true if the left mouse button is pressed

rmb_state = [login to view URL](0x02)

return rmb_state < 0

def agachar():

global agachado

if fpp == 1:


if [login to view URL]('[login to view URL]', region=(709,975,30,50), grayscale=True, confidence=0.70) != None:


[login to view URL](350, 100)

agachado = False

return agachado



[login to view URL](100, 50)

agachado = True

return agachado

elif tpp == 1:

agachado = not agachado

return agachado

def process_no_recoil(x, x, x, x, x, x....):

count = 0

count_tempo = 0

multiplicador_tempo = 0

if dector_arma == 1:

start = [login to view URL]()

if rmb_down():


while rmb_down() and lmb_down():


Aptitudini: Algoritm, Python, Programare C, OpenCV

Despre client:
( 1 părere ) Taquari, Brazil

ID Proiect: #28186665

4 freelanceri licitează în medie 28$ pentru acest proiect


Dear Employer, I have read your project description and I am glad to let you know that I can help you improve the speed of code. I'm an expert in Python having more than 10 years of experience, I believe in quality de Mai multe

%bids___i_sum_sub_35%%project_currencyDetails_sign_sub_36% USD în 3 zile
(21 recenzii)

Hello, sir I am a professional image processing developer. I know the opencv and python well. I saw your code and I am very interested in your project And I developed several products for image processing We can discu Mai multe

%bids___i_sum_sub_35%%project_currencyDetails_sign_sub_36% USD în 7 zile
(6 recenzii)

I am glad to have an opportunity of bidding for your project. I am a full stack python and image processing expert having enough skills and experiences in computer vision ,DL and ML. I have developed lots of projects s Mai multe

%bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD în 1 zi
(6 recenzii)

Hello. I have enough experiences for Python program. I read your code and understand sufficiently. I think I can work with you. Wish hear from you. Tales Moraes.

%bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD în 1 zi
(0 recenzii)