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

Frame display issue in pyaer #9

Closed
nuges01 opened this issue Feb 2, 2019 · 5 comments
Closed

Frame display issue in pyaer #9

nuges01 opened this issue Feb 2, 2019 · 5 comments

Comments

@nuges01
Copy link

nuges01 commented Feb 2, 2019

Thanks for this awesome easy-to-use tool!

I have an issue. I'm using a DAVIS346 Color (Red). When I run davis346_test.py, the events output displays motion as expected in the "image" window. However, the image frame shown in the "frame" window is not correctly displayed. Below is an example of what the "frame" window looks like:
frame

By contrast, below is how the jAER application displays the frame with no change in the camera position:
jaer

For some reason, the frame shown in pyAER appears zoomed in quite a bit, and there are 3 of everything (so if I move the camera to the left in the "frame" image above, I'll see a third clock). Do you know why this might be happening? I wonder if the replicated objects are from RGB channels sent from the camera being somehow mishandled in the wrapper and shown as grayscale?

Thanks again!

@nuges01
Copy link
Author

nuges01 commented Feb 2, 2019

I was able to get around it for my camera by changing the following at around lines 439-447 in device.py:

        #if device_type == libcaer.DAVIS_CHIP_DAVIS240C:
        #    frame_mat = libcaer.get_frame_event_240(first_event)
        #elif device_type == libcaer.DAVIS_CHIP_DAVIS346B:
        #    frame_mat = libcaer.get_frame_event_346(first_event)          
        #else:
        Y_range = libcaer.caerFrameEventGetLengthY(first_event)
        X_range = libcaer.caerFrameEventGetLengthX(first_event)
        frame_mat = libcaer.get_frame_event(
            first_event, Y_range*X_range*3).reshape(Y_range, X_range,3)

and then a BGR to RGB conversion in davis346_test.py

@duguyue100
Copy link
Owner

Hi, thanks for using pyaer in the first place, however, I guess what you have is the latest version of the DAVIS 346 and what I use now is DAVIS 346 BLUE.

I am not able to get one that you have to test pyaer yet.

Your quick fix is definitely on the right track, but for more appropriate support, I need to change the code in pyflags.i so that it can read RGB frames properly.

Can you wait for about a week for me to fix it? I think I can get the new cameras in a week or so.

Regards,
Yuhuang.

@nuges01
Copy link
Author

nuges01 commented Feb 2, 2019

Sure! Take your time. This temporary fix is fine for me for now.

Thanks!

@duguyue100
Copy link
Owner

@duguyue100
Copy link
Owner

Will close this issue since the frame display is supported in version 0.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants