CPBridge / monogenic

An implementation of the monogenic signal using C++ and OpenCV
GNU General Public License v3.0
8 stars 5 forks source link

Video for testing is missing #2

Open sparshgarg23 opened 3 years ago

sparshgarg23 commented 3 years ago

Hi,could you please include the test video

CPBridge commented 3 years ago

Hi @sparshgarg23, there is no particular test video. You should be able to run the example on any video file you have.

sparshgarg23 commented 3 years ago

Hi thanks chris for getting back,one last question in your matlab repository you have mentioned the usage of phase congruency for edge detection. Can the same principle be extended to c++ also.Would appreciate it if you could give me some pointers on how to translate this specific part of the code into C++. f1 = cat(4,m1(:,:,:,1),m2(:,:,:,1),m3(:,:,:,1)); f2 = cat(4,m1(:,:,:,2),m2(:,:,:,2),m3(:,:,:,2)) As you have mentioned the dimension of m1 is YxXx1xW so f1 is simply obtained by stacking the first wavelength component of m1,first wavelength component of m2 and first wavelength component of m3 right. similarly for f2.

CPBridge commented 3 years ago

The same principle can certainly be extended to the C++ implementation, I just never got around to it.

If f1 is the vector of the monogenic signal ([even, odd1, odd2]) for a given pixel and scale 1 and f2 is the vector for the same pixel at scale 2, then the phase congruency at that pixel is given by equation 12 of Felsberg and Sommer's paper.

In the matlab version, I implemented this by first stacking the components into a 4D array and then performing vectorised operations on that array, which is straightforward in matlab. The same approach may not necessarily make sense in the C++ implementation, where such operations on multi-dimensional arrays are not so convenient.

It is unfortunately a long time now since I have used opencv so I can't remember what functionality is available. I would guess something like this would be a good approach:

If you do get this to work, please consider contributing it to this repository so that others can use it