-
-
Notifications
You must be signed in to change notification settings - Fork 28
implemented text recognition (ocr) #272
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
Changes from 19 commits
efe7f73
a00dd41
ead3463
d36e2d4
c9766bf
8998360
f25fc7e
2f8d298
fddd0ae
cd2c212
80140cb
450b983
feeb58e
fb8ed6f
da830c6
5674088
b5f6639
f1ba410
d1dfff0
f3c0e3e
3a3015f
75cd0e9
7be9a0e
043b6b5
c0b2920
f2b407a
9cd0c2b
2f03a90
797492f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -307,7 +307,8 @@ def __reload_start_image(self, started_by_button: bool = False, wait_for_delay: | |
| self.highest_similarity = 0.0 | ||
| self.reset_highest_similarity = 0.0 | ||
| self.split_below_threshold = False | ||
| self.timer_start_image.start(int(ONE_SECOND / self.settings_dict["fps_limit"])) | ||
|
|
||
| self.timer_start_image.start(int(ONE_SECOND / self.start_image.get_fps_limit(self))) | ||
|
|
||
| QApplication.processEvents() | ||
|
|
||
|
|
@@ -683,7 +684,7 @@ def __similarity_threshold_loop(self, number_of_split_images: int, dummy_splits_ | |
| QApplication.processEvents() | ||
|
|
||
| # Limit the number of time the comparison runs to reduce cpu usage | ||
| frame_interval = 1 / self.settings_dict["fps_limit"] | ||
| frame_interval = 1 / self.split_image.get_fps_limit(self) | ||
| # Use a time delta to have a consistant check interval | ||
| wait_delta_ms = int((frame_interval - (time() - start) % frame_interval) * ONE_SECOND) | ||
|
|
||
|
|
@@ -867,7 +868,11 @@ def __update_split_image(self, specific_image: AutoSplitImage | None = None): | |
|
|
||
| # Get split image | ||
| self.split_image = specific_image or self.split_images_and_loop_number[0 + self.split_image_number][0] | ||
| if is_valid_image(self.split_image.byte_array): | ||
| if self.split_image.is_ocr: | ||
| # TODO: test if setText clears a set image | ||
| text = "\nor\n".join(self.split_image.texts) | ||
| self.current_split_image.setText(f"Looking for OCR text:\n{text}") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember from last time I tested, will this override any previous image being rendered on the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question, I did not test this. But just to be sure we could just
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, If
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I won't block for this with the TODO comment. Just bumping as a reminder we should test it to confirm |
||
| elif is_valid_image(self.split_image.byte_array): | ||
| set_preview_image(self.current_split_image, self.split_image.byte_array) | ||
|
|
||
| self.current_image_file_label.setText(self.split_image.filename) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.