-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ORB algorithm #918
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
ORB algorithm #918
Conversation
Updating the forked repository.
@kaustubhgupta, Please review this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShubhamGupta577 you are using the same image for training and testing. Use different image for testing and training
@santushtisharma10, As ORB is used to detect the features of an image regardless of its orientation and resolution. So for the test image, I added the Scale invariance and rotational invariance to the training image so that its alignment and resolution get changed and after that try to match the features. |
@ShubhamGupta577 i am not asking to use 2 totally different images. Look at the output here. Like in your case as well, you can use 2 different pics of same celebrity, that should also work |
ORB Algorithm/ORB_Algorithm.py
Outdated
import numpy as np | ||
|
||
# Load the image | ||
path=input('Enter the path of the image') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path=input('Enter the path of the image') | |
path=input('Enter the path of the image: ') |
ORB Algorithm/ORB_Algorithm.py
Outdated
# Load the image | ||
path=input('Enter the path of the image') | ||
image = cv2.imread(path) | ||
path2=input('Enter the path for testing image') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path2=input('Enter the path for testing image') | |
path2=input('Enter the path for testing image: ') |
ORB Algorithm/ORB_Algorithm.py
Outdated
|
||
# Display the best matching points | ||
cv2.imshow('result',result) | ||
cv2.imwrite('./feature_matched.jpg',result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this change in the path. Also, save the image as file_name (featureMatched).jpg
. To understand better, see this example:
Suppose input image name: abc.jpg
Output image name should be: abc (featureMatched).jpg
cv2.imwrite('./feature_matched.jpg',result) | |
cv2.imwrite('./ORB Algorithm/feature_matched.jpg',result) |
Co-authored-by: Antriksh Misri <54466356+antrikshmisri@users.noreply.github.com>
Description
Added the code for the ORB(Oriented FAST Rotated Brief) algorithm of OpenCV for the feature detection of an image.
Fixes #898
Have you read the Contributing Guidelines on Pull Requests?
Type of change
Checklist:
README.md
Template for README.md