Skip to content

Feature Matching OpenCV#3

Merged
ismukhin merged 12 commits intoitlab-vision:mainfrom
SimonovDmitry:opencv_sample
Mar 3, 2026
Merged

Feature Matching OpenCV#3
ismukhin merged 12 commits intoitlab-vision:mainfrom
SimonovDmitry:opencv_sample

Conversation

@SimonovDmitry
Copy link
Copy Markdown
Contributor

No description provided.

@ismukhin
Copy link
Copy Markdown
Contributor

Для изображений нужно создать отдельную директорию в корне test_data и положить их туда

logger.info(f"Launching opencv_sample")
matcher = FeatureMatcherCV2(args.method)
if not matcher.load_images(args.image1, args.image2):
return 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно отлогировать что пошло не так явно

Comment on lines +38 to +39
target_method = f"{self._method_name.upper()}_create"
method = getattr(cv, target_method, None)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На самом деле это не очень хороший подход, потому что не видно явно по коду какой метод мы создаем, плюсом нет гарантий, что всегда верхний регистр у методов. Поэтому здесь предложение создать где-то словарь:

methods = {
    'SIFT': cv2.SIFT_create(),
    'ORB': cv2.ORB_create(),
}

@ismukhin
Copy link
Copy Markdown
Contributor

Надо подцепить изменения с мастер-ветки в свою мастер-ветку, после чего в текущей ветке opencv_sample сделать git merge https://docs.github.com/ru/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork

@ismukhin ismukhin merged commit b1a928f into itlab-vision:main Mar 3, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants