pislam icon indicating copy to clipboard operation
pislam copied to clipboard

How can I use an Array of pyramid images instead of one large collage!?

Open Fredrum opened this issue 4 years ago • 2 comments

Hi,

I'm trying to use Pislam with an image pyramid that is a array/Vector of Mat's, instead of how it's currently working with one big collage of the images in the pyramids 'stuck together'.

I'm getting compiler errors when I try to invoke, pislam::fastDetect<iter_width, 16>(levelWidth, levelHeight, imgPtr, outPtr, 20);

it seems the system needs to compile in the value of 'iter_width' at build time and it can't change when I run?

Is this a part of the optimized code or is there a way around this?

Cheers Fred

Fredrum avatar Jul 05 '20 02:07 Fredrum

Yes, the templates width is an optimization (although it's dubious if it gives much benefit).

I see three options:

  1. Use the pyramiding function multiple times with just one level, and map each level into a cv::Mat.

  2. Take the single image, and map the area of each level to a different cv::Mat using the CV::Mat(h, w, type, data_ptr, step) constructor.

  3. Rewrite the code to not rely on the width template.

2020年7月5日(日) 4:57 Blueroom VR [email protected]:

Hi,

I'm trying to use Pislam with an image pyramid that is a array/Vector of Mat's, instead of how it's currently working with one big collage of the images in the pyramids 'stuck together'.

I'm getting compiler errors when I try to invoke, pislam::fastDetect<iter_width, 16>(levelWidth, levelHeight, imgPtr, outPtr, 20);

it seems the system needs to compile in the value of 'iter_width' at build time and it can't change when I run?

Is this a part of the optimized code or is there a way around this?

Cheers Fred

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/0xfaded/pislam/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABFEXJL2E5IJGJYXUHGSXTRZ7T2TANCNFSM4OQVJBAA .

0xfaded avatar Jul 05 '20 12:07 0xfaded

Hi and thank you. I managed to find an inbetween where I just pad the width of each pyramid slice to the IMG_W width. It'll do for now as I still need to figure out how I will optimally generate the pyramid on the fly.

I see that the original ORB2 code seems to apply the Gaussian blur only just before doing that 'ComputeDescriptors' and before that it uses the raw images, if I understand correctly.

While you are using the blurred images from the start and throughout the full process.

Am I getting that right? I know it's been a while since you wrote this so you might not remember.

Cheers

Fredrum avatar Jul 05 '20 18:07 Fredrum