Code Monkey home page Code Monkey logo

Comments (7)

duguyue100 avatar duguyue100 commented on July 16, 2024

This is actually correct, the index should start from 0 and end with height-1 or width-1.

from v2e.

EMJian avatar EMJian commented on July 16, 2024

Maybe my earlier statement was confusing.
Here's what I really want to say:
In text file, events should be order in t, x, y, p.
But it outputs text file in order t, y, x, p incorrectly.
Also i agree with your opinion of coordinate index.

from v2e.

tobidelbruck avatar tobidelbruck commented on July 16, 2024

Arghh, this is annoying, sorry about this. In looking through our own code we did a crappy job commenting which index is which for x and y. There could perhaps be a bug although in ae_text_output.py line 75 it reads as follows which makes the order t,x,y,p
self.file.write('{} {} {} {}\n'.format(t[i],x[i],y[i],p[i])) # todo there must be vector way
x is defined by line 69 as element 2 of events:
x = events[:, 2].astype(np.int32) # Issue #37, thanks Mohsi Jawaid
and everything in emulator.py is based on the incoming video frame, which in line 559 has the comment

       new_frame: np.ndarray
            [height, width], NOTE y is first dimension, like in matlab the column, x is 2nd dimension, i.e. row.

which implies that element 2 is x and element 1 is y. Therefore I cannot see where the bug you report comes from. I must be missing something.

Did you check that you properly defined --output_width=346 and --output_height=260? Or else used --dvs346 option?

from v2e.

tobidelbruck avatar tobidelbruck commented on July 16, 2024

It could well be there is a bug here. I never use the text output myself, only AEDAT-2.0 for jAER. So let me try to find time to reproduce the problem. In the meantime you can just try swapping x and y at line 75 of ae_text_output.py

from v2e.

EMJian avatar EMJian commented on July 16, 2024

I checked all options. There is no doubt that all of these options are properly defined. Actually, I added the additional option "--dvs_text=dvs.txt" to the command on line 409 in README.md. Of course, the rest is unchanged. This problem was still reproduced.

python v2e.py -i input/tennis.mov --overwrite --timestamp_resolution=.003 --auto_timestamp_resolution=False --dvs_exposure duration 0.005 --output_folder=output/tennis --overwrite --pos_thres=.15 --neg_thres=.15 --sigma_thres=0.03 --dvs_aedat2 tennis.aedat --output_width=346 --output_height=260 --stop_time=3 --cutoff_hz=15 --dvs_text=dvs.txt

from v2e.

EMJian avatar EMJian commented on July 16, 2024

For me, I don't change the v2e code. I try to swap x and y order in text file to generate the correct results.

from v2e.

tobidelbruck avatar tobidelbruck commented on July 16, 2024

The earlier issue #37 was incorrectly addressed by changing the order in ae_text_output.py. The #37 patch was the result of incorrect docstring return spec in emulator.py that claimed the return order was [t,y,x,p] - this is incorrect.
I have fixed all docstring I could find and added comments in code about events structure column ordering of t,x,y,p now.

from v2e.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.