ImageFeatures.jl icon indicating copy to clipboard operation
ImageFeatures.jl copied to clipboard

CENSURE Keypoint Detector

Open mronian opened this issue 9 years ago • 13 comments

  • [x] DataTypes
  • [x] Filters
    • [x] Box
    • [x] Octagon
    • [ ] Star
  • [x] Filter Response
    • [x] Box
    • [x] Octagon
    • [ ] Star
  • [x] Feature Detect

mronian avatar Jun 29 '16 20:06 mronian

@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.

mronian avatar Jul 03 '16 11:07 mronian

@timholy This is ready for review :)

mronian avatar Jul 28 '16 00:07 mronian

@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?

mronian avatar Jul 31 '16 05:07 mronian

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

timholy avatar Aug 01 '16 09:08 timholy

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

timholy avatar Aug 01 '16 09:08 timholy

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!)

timholy avatar Aug 01 '16 09:08 timholy

@mronian You don't seem to be working on this. Can I finish it off?

tejus-gupta avatar Apr 28 '17 19:04 tejus-gupta

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.

mronian avatar Apr 28 '17 20:04 mronian

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.

tejus-gupta avatar Apr 30 '17 14:04 tejus-gupta

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?

mronian avatar Apr 30 '17 17:04 mronian

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 avatar May 06 '17 06:05 tejus-gupta

@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.

mronian avatar May 24 '17 15:05 mronian

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!

mronian avatar May 24 '17 19:05 mronian