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

Port corners.jl to ImageFeatures.jl #682

Closed
zygmuntszpak opened this issue Nov 17, 2017 · 5 comments
Closed

Port corners.jl to ImageFeatures.jl #682

zygmuntszpak opened this issue Nov 17, 2017 · 5 comments
Labels

Comments

@zygmuntszpak
Copy link
Member

I propose that corners.jl, which currently implements harris, shi-tomasi and kitchen_rosenfeld, be moved to ImageFeatures.jl and be re-written so that it conforms to the conventions of the ImageFeatures.jl package. I'd be happy to give this a go.

@timholy
Copy link
Member

timholy commented Nov 17, 2017

Seems right to me. Some thinking about deprecation strategy could be warranted, though. Base has experienced some pains from moving code out to the standard library or packages.

@Evizero
Copy link
Member

Evizero commented Nov 17, 2017

We did do it before reasonably painlessly with ImageTransformations. Or do you not plan to reexport ImageFeatures here?

@timholy
Copy link
Member

timholy commented Nov 17, 2017

ImageFeatures is not a dependency of Images (it's vice versa).

@zygmuntszpak
Copy link
Member Author

I've studied the code of ImageFeatures.jl some more and realised that it does not introduce any new corner detectors. Instead, the package uses the corner extraction functions in the Images.jl package. Each corner extraction function produces a binary matrix which indicates whether a particular pixel location is a corner. As a first step, the ImageFeatures.jl package converts this binary matrix into a Keypoints type, for example: Keypoints(fastcorners(img1, 12, 0.4)). Then, the package facilitates the extraction of a variety of local feature descriptors which are typically based on the neighbourhood pixels of the corner. The package also facilitates using the descriptors to match Keypoints between two views.

The ImageFeatures.jl package appears to make the distinction between a feature (i.e. a corner) and a descriptor for this feature. Hence, perhaps there is no need to move the code for detecting corners from Images.jl to ImageFeatures.jl after all?

My ultimate aim is to introduce the ability to compute corners to sub-pixel precision. My current thinking is to keep the imcorner function in Images.jl and to extend it or to introduce another function such as imcorner_subpixel. One possibility for extending would be to make the imcorner function return not just a binary matrix indicating whether a pixel was a corner, but also a matrix that stores the 'corner strength' of each pixel. We could then introduce a function pixel2subpixel or corner2subcorner which takes as input the binary matrix and the corner matrix and does the appropriate interpolations to get sub-pixel precision.

I would then make some changes in the ImageFeatures.jl package so that a Keypoint type need not be an integer.

In summary, contrary to my initial suggestion, I would prefer to hold off moving the corner detection functions to ImageFeatures.jl for now. Rather, I would prefer to focus on getting the sub-pixel precision working.

timholy added a commit that referenced this issue Dec 17, 2017
Add sub-pixel corner detection capability #682
@timholy
Copy link
Member

timholy commented Jul 23, 2023

Closed by #1028

@timholy timholy closed this as completed Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants