refactor config
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import random
|
||||
from time import time
|
||||
from window_capture import WindowCapture
|
||||
from stun_vision import StunVision
|
||||
from vision import Vision
|
||||
import cv2 as cv
|
||||
import pytesseract
|
||||
from hsvfilter import HsvFilter
|
||||
@@ -19,7 +19,7 @@ def run():
|
||||
# initialize the StunWindowCapture class
|
||||
try:
|
||||
capture_window = WindowCapture(
|
||||
None, "stun", config)
|
||||
None, "equip", config)
|
||||
video_mode = False
|
||||
except:
|
||||
# StunWindowCapture.list_window_names()
|
||||
@@ -28,7 +28,7 @@ def run():
|
||||
video_mode = True
|
||||
|
||||
# initialize the StunVision class
|
||||
vision_stun = StunVision()
|
||||
vision_stun = Vision()
|
||||
# initialize the StunOverlay class
|
||||
hsv_filter = HsvFilter(0, 0, 124, 15, 255, 168, 0, 255, 0, 0)
|
||||
|
||||
@@ -157,9 +157,9 @@ def run():
|
||||
processed_needle = vision_stun.apply_hsv_filter(needles[rer], hsv[rer])
|
||||
rectangles = vision_stun.find(processed_screenshot, processed_needle, 0.8, 5)
|
||||
# draw the detection results onto the original image
|
||||
output_image = vision_stun.draw_rectangles(processed_screenshot, rectangles)
|
||||
cv.imshow("output_image", output_image)
|
||||
cv.waitKey(150)
|
||||
#output_image = vision_stun.draw_rectangles(processed_screenshot, rectangles)
|
||||
#cv.imshow("output_image", output_image)
|
||||
#cv.waitKey(150)
|
||||
|
||||
if len(rectangles) is not 5:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user