Skip to content

Conversation

ShubhamGupta577
Copy link
Contributor

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?

  • Yes

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines(Clean Code) of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have created a helpful and easy to understand README.md
  • My documentation follows Template for README.md
  • My changes generate no new warnings
  • I have added tests/screenshots(if any) that prove my fix is effective or that my feature works.

@ShubhamGupta577
Copy link
Contributor Author

@kaustubhgupta, Please review this PR.

Copy link
Contributor

@santushtisharma10 santushtisharma10 left a 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 santushtisharma10 added the minor-change-not-bug Suggested a minor change in code, not a bug label Apr 17, 2021
@ShubhamGupta577
Copy link
Contributor Author

@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.
So can you please specify to me that either I have to use 2 totally different images for matching or can continue with this.

@santushtisharma10
Copy link
Contributor

@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

@santushtisharma10 santushtisharma10 added next review needed Approved by some mentors, more approvals needed and removed minor-change-not-bug Suggested a minor change in code, not a bug labels Apr 18, 2021
import numpy as np

# Load the image
path=input('Enter the path of the image')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
path=input('Enter the path of the image')
path=input('Enter the path of the image: ')

# Load the image
path=input('Enter the path of the image')
image = cv2.imread(path)
path2=input('Enter the path for testing image')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
path2=input('Enter the path for testing image')
path2=input('Enter the path for testing image: ')


# Display the best matching points
cv2.imshow('result',result)
cv2.imwrite('./feature_matched.jpg',result)
Copy link
Contributor

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

Suggested change
cv2.imwrite('./feature_matched.jpg',result)
cv2.imwrite('./ORB Algorithm/feature_matched.jpg',result)

@kaustubhgupta kaustubhgupta added enhancement New feature or request minor-change-not-bug Suggested a minor change in code, not a bug labels Apr 19, 2021
ShubhamGupta577 and others added 2 commits April 20, 2021 03:18
Co-authored-by: Antriksh Misri <54466356+antrikshmisri@users.noreply.github.com>
@kaustubhgupta kaustubhgupta removed enhancement New feature or request minor-change-not-bug Suggested a minor change in code, not a bug next review needed Approved by some mentors, more approvals needed labels Apr 20, 2021
@kaustubhgupta kaustubhgupta added Approved PR Approved and Ready to Merge gssoc23 Issues created for/by the GirlScript Summer of Code'23 Participants level2 Bug fixing, Adding small features labels Apr 20, 2021
@avinashkranjan avinashkranjan merged commit 10478aa into avinashkranjan:master Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved PR Approved and Ready to Merge gssoc23 Issues created for/by the GirlScript Summer of Code'23 Participants level2 Bug fixing, Adding small features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add implementation of ORB algorithm for feature detection.
5 participants