Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensor.set_windowing(roi) not working #191

Open
bherbruck opened this issue Dec 9, 2019 · 5 comments
Open

sensor.set_windowing(roi) not working #191

bherbruck opened this issue Dec 9, 2019 · 5 comments
Labels
enhancement New feature or request need to implement This refers to features that are not yet implemented

Comments

@bherbruck
Copy link

bherbruck commented Dec 9, 2019

sensor.set_windowing() does not center when no x, y coords are given,
also does not move window to x, y coords.
Same image is returned:
sensor.set_windowing((50, 0, 224, 224))
sensor.set_windowing((0, 0, 224, 224))
This causes image distortion huge problems with wide angle lenses.

image

I believe the issue is with the dvp libraries, the image just crops to the top-left corner instead of centering.

@ted99tw
Copy link

ted99tw commented Dec 31, 2019

I want this function too, but it seems the dvp lib leaves this as //to do in the source code. I use img.resize(224,224) instead.

@bherbruck
Copy link
Author

I haven't been able to get img.resize() working and can't find any documentation for it although it is in py_image.c.
I'm also using this for yolo2 and I think sensor.set_windowing also does something with dvp_set_ai_addr() which may affect yolo2. I have no clue though.

@ted99tw
Copy link

ted99tw commented Dec 31, 2019

It seems that yolo2 or mobilenet both refer to dvp_set_ai_addr() and the pix_ai data of the image itself. What I am in need is to resize an image from QVGA to (224,224) for yolo2 or mobilenet by using resize(). Although resize() works fine but the ai data lost after resizing. So I make a #198 pull request to make this happen. I hope it can be accepted so. So we can just use image.resize(224,224) without using something like set_windowing(50,224,224) for kpu task.

@Neutree
Copy link
Member

Neutree commented Aug 7, 2020

gc0328 has supported, commit here : a3fc950
but other sensors need to implement

@Neutree
Copy link
Member

Neutree commented Aug 7, 2020

and pay attention, the width or height must multiple of 8 bytes

@Neutree Neutree added enhancement New feature or request need to implement This refers to features that are not yet implemented labels Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need to implement This refers to features that are not yet implemented
Projects
None yet
Development

No branches or pull requests

3 participants