Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search-speed / Not compatible with the major rewrite? #165

Open
brewtide opened this issue Mar 18, 2024 · 2 comments
Open

search-speed / Not compatible with the major rewrite? #165

brewtide opened this issue Mar 18, 2024 · 2 comments

Comments

@brewtide
Copy link

Hello!
Love your software. I recently went to use the search function to see how well / if it would work for my use case, and unfortunately it didn't seem to work. (I've attached the end result at bottom),

I did see that many configuration variables had changed (since the 13* version...) and while not a programmer, managed to change how it doesn't work, but yet to get the search function to work!

I realize it was not fully completed / beta, but I was wondering if you had any suggestions? I may try to setup an instance of the older version of the software, and configure my image-size / position units into the old config, but have the images pull from the 13.* image creation location to see if that will work.

Again, thanks for your software -- I figured I'd reach out and ask if you had any suggestions since you were the creator!
(And honestly, I'm not even sure if it 'worked' in the earlier speed-cam versions, but it seemingly did to some extent?)

search-speed.py ver 5.60 Loading Please Wait .....
Traceback (most recent call last):
File "/home/bbrewer/speed-camera/./search-speed.py", line 76, in
sw = 100 * image_bigger # default search rectangle Width
^^^^^^^^^^^^
NameError: name 'image_bigger' is not defined

######################################

Review Output

######################################
Press Enter to Return to Main Menu

@SamDecrock
Copy link

SamDecrock commented Mar 23, 2024

I've not tested the code, but from the looks of it I think you can fix it by replacing image_bigger with IM_BIGGER which changed name in the major update commit.

Update: I've run the code and you will need a few more changes:

# Initialize size of rectangle to crop for search matches
sw = 100 * IM_BIGGER  # default search rectangle Width
sh = 45 * IM_BIGGER  # default search rectangle height
crop_x_L = (MO_CROP_X_LEFT + 10) * IM_BIGGER
crop_x_R = (MO_CROP_X_RIGHT - 10) * IM_BIGGER
crop_y_U = (MO_CROP_Y_UPPER + 10) * IM_BIGGER
crop_y_D = (MO_CROP_Y_LOWER - 10) * IM_BIGGER

Not sure it works though as responds with:

Loading Target Search Image media/search/speed-5-20240323-1504239.jpg
ERROR: Problem Extracting search_rect from media/search/speed-5-20240323-1504239.jpg
ERROR: Problem Creating Search Rectangle.
       Cannot Search Match media/search/speed-5-20240323-1504239.jpg

@brewtide
Copy link
Author

Hey, I appreciate it. I kind of rambled in my above original question, but like you, I had done those additional variable changes and ended up with the same result, which is where I was left stumped. (Not really a programmer). I didn't paste that output as I had done it a week before and couldn't fully remember the 'new error' I was getting.

I'll likely poke at this again this evening to see if I can figure it out -- Or I may just try to use one of the older versions (with old variables) but feed it my 'dataset'.

I was stuck at that point as well, and couldn't quite figure out steps beyond!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants