Using the python bindings I created a pipeline of which one part is to dewarp a fish eye image, resize it and then crop it for further processing. Everything works so far, but I seem to be restricted in the resolutions I can choose.
But If I choose something like output-width=842 and out put-height=1072 the resulting image has the right dimensions but the content of the image will be “zoomed in” so that I am missing parts of the image. See image 2.
I would expect a resizing function to output the exact same image (meaning content) with just a different resolution.
For me so far the problem seems to be related to the ratio between output-width and output-height it has to roughly match the ratio of width and height (of surface0) to not get this “zoomed in” effect.
I also tried to not use the output-width/height function of nvdewarper but instead to use a nvvideoconverter to resize the image after it has been dewarped, but this results in the same problem.
Also for some resolutions I get some black borders. In image one such a border can be seen at the bottom.
Am I misunderstanding something about the resize procedure?
@bcao
Yes, I have seen this thread. But I didn’t find anything that applies to my situation. Did you have a specific post of this thread in mind?
Hopefully the following example can make my problem more clear. You should also be able to reproduce it given the uploaded video or any other fish-eye video. test_video_camL
I would expect image 2 and 4 to show as much of the room as image 1 and 3, just in a different resolution. Could this be a bug or am I misunderstanding something.
@bcao Thanks for the update. While this environment will probably help with al kind of different issues, my issue, as stated above, is also reproducible with a fish eye video.
Hi,
Can you try below dewarper size, it will give better results for all the 4 cases you listed(scaled to different output width and height)
width=3886
height=666