What is the visionworks vxLaplacianPyramid internal logic?

I tested the vxLaplacianPyramid API and the image reconstruction result,compared to opencv implementation.

The Laplacian pyramid is dismatched ,and the reconstructed image is dismatched too.

I need help for this ,
Thanks
.2020-12-30-08:07:46recon4_pyr_0_ 2020-12-30-08:07:46recon4_pyr_1_ 2020-12-30-08:07:46recon4_pyr_2_ 2020-12-30-08:07:46recon4_pyr_3_ 2020-12-30-08:07:46recon4_pyr_4_ 2020-12-30-08:07:46recon4_pyr_5_ 2020-12-30-08:07:46recon4_pyr_6_ 2020-12-30-08:07:46recon4_pyr_7_

opencv

py_gau_0 py_gau_1 py_gau_2 py_gau_3 py_gau_4 py_gau_5 py_gau_6 py_gau_7 py_gau_8 py_lap_1 py_lap_2 py_lap_3 py_lap_4 py_lap_5 py_lap_6 py_lap_7 py_lap_8

Hi,

Is the black pyramid output from the VisionWorks?
If yes, could you share a source to reproduce this in our environment?

Thanks.

Hi,
The black image pyramid image is not PURE black,some pixel value is bigger than zero in the image ,and the pyramid can constructed the image ,but is not expected .

Here is the source file.
main_lap_pyr.cpp (4.8 KB) util.h (5.3 KB)

Hi,
I tested the images in the laplacian pyramid with opencv-python,the problem may be in the pyramid up phase,the interplation type is incorrect.
And I post here the raw image and reconstructed image from visionworks .
and the opencv implementation.
c2.py (1.5 KB)
the opencv’s result is similar to the NV’s visionworks’
– visionworks’result


–opencv-interplation-iner-nereast

–opencv-pyrup

–raw input image to visionworks

– laplacian pyramid levels’ images.

2020-12-30-08:07:46recon4_pyr_3_ 2020-12-30-08:07:46recon4_pyr_4_ 2020-12-30-08:07:46recon4_pyr_5_ 2020-12-30-08:07:46recon4_pyr_6_ 2020-12-30-08:07:46recon4_pyr_7_

lap_pyr_top

Hi,

Based on the implementation, VisionWorks uses linear interpolation rather than the nearest neighbor.
Not sure why the result looks like an NN-based output.

Let us check this based on your source and get back to you later.
Thanks.

Hi,

It seems that our VisionWorks doesn’t implement a lossless reconstruction so that the results will be different from the OpenCV.
If you want a lossless version, you can try to implement custom kernels as below:
https://www.khronos.org/registry/OpenVX/specs/1.1/html/da/d83/group__group__user__kernels.html

Thanks