CENSURE Keypoint Detector
- [x] DataTypes
- [x] Filters
- [x] Box
- [x] Octagon
- [ ] Star
- [x] Filter Response
- [x] Box
- [x] Octagon
- [ ] Star
- [x] Feature Detect
@timholy I have some doubts which I have written inline as comments on the files. I have tried to make the code fast by looking at benchmarks and ProfileView(Thanks for that!) checked the type warning for most things.
@timholy This is ready for review :)
@timholy I am changing the Keypoint type to be an alias of CartesianIndex{2} instead of the current type since it is easier for calculating descriptors (can be seen in the upcoming BRIEF descriptor) -
type Keypoint
x::Integer
y::Integer
end
Do you have a better representation in mind?
I am changing the Keypoint type to be an alias of CartesianIndex{2} instead of the current type
That's a good idea---you'll get a lot of very nice behavior for free that way.
For future reference when you do create your own types, remember that Integer is an abstract type and that you should avoid using abstract types as fields in a type if at all possible because performance will be terrible. It's much better to use a parametric type,
type KeyPoint{T<:Integer}
x::T
y::T
end
Refs: http://docs.julialang.org/en/latest/manual/performance-tips/#avoid-containers-with-abstract-type-parameters http://docs.julialang.org/en/latest/manual/performance-tips/#avoid-fields-with-abstract-type http://docs.julialang.org/en/latest/manual/performance-tips/#avoid-fields-with-abstract-containers
Aside from very small points, this seems fine to me. (I'll have to play with it to really kick the tires, but it looks very promising!)
@mronian You don't seem to be working on this. Can I finish it off?
Yeah sure. It is mostly ready, you will need to update the code to the latest Julia. I did not merge it since the docs were not there.
In filter response for octagon filter,
topright = I + CartesianIndex(m_in2, - m_in2 - OF.n_in - 1)
bottomleft = I + CartesianIndex(- m_in2 - 1, m_in2 + OF.n_in)
I don't think this is correct. The error wouldn't effect the filter response though.
The filter response was correct since I had manually checked it for a few octagons and images. You can check it again to confirm. What seems to be the error in the code?
It should be topright = I + CartesianIndex(- m_in2 - 1, m_in2 + OF.n_in) bottomleft = I + CartesianIndex(m_in2, - m_in2 - OF.n_in - 1)
The filter response would come out correctly because in_sum=A + D - B - C. Swapping B and C wouldn't change in_sum.
@tejus-gupta I don't think its wrong. topright has to be obtained by decreasing the y-coordinate and increasing the x-coordinate and for bottomleft you will have to increase the y and decrease the x from the centre I.
Whoops. I mistook the lines you mentioned as those from the code instead of corrections. Agreed, it is incorrect. Go ahead, @tejus-gupta 😄 Sorry for the trouble!