-
Notifications
You must be signed in to change notification settings - Fork 1
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
Suggestions for implementing a background grid #50
Comments
Hi Alex, I am attempting to display a grid in
From my limited understanding, the second method makes more sense if display various event calculation results but I cant' make the scaling work correctly even I copy the relevant code in the Could you please elaborate on the problem? Thanks, |
Hi Fanpeng, I would use the second approach, as it results in simpler code. I think you can solve your problem by manually updating the position and size of the grid display whenever the In this example, the important part is the DvsDisplay {
...
onPaintAreaChanged: {
blob_display.x = paint_area.x
blob_display.y = paint_area.y
blob_display.width = paint_area.width
blob_display.height = paint_area.height
}
} Can you let me know if it works? Cheers, |
Thanks for the suggestions, Alex. I have been travelling overseas
since last week and did not have much internet access. I found a
temporal solution by setting the painter window to the same as the
clear area. Will check your versions later when I get back to my
office.
Cheer,
Fanpeng
Alexandre Marcireau writes:
… Hi Fanpeng,
I would use the second approach, as it results in simpler code.
I think you can solve your problem by manually updating
the position and size of the grid display whenever the
paint_area of the dvs_display changes in QML. An example can be
found here:
https://github.com/neuromorphic-paris/tutorials/blob/master/examples/blob_tracker/source/blob_tracker.qml.
In this example, the important part is the onPaintAreaChanged
method of the DvsDisplay:
DvsDisplay {
...
onPaintAreaChanged: {
blob_display.x = paint_area.x
blob_display.y = paint_area.y
blob_display.width = paint_area.width
blob_display.height = paint_area.height
}
}
Can you let me know if it works?
Cheers,
Alex
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
--
Dr. Fanpeng Kong
Postdoctoral Fellow
School of Engineering &
Information Technology
UNSW Canberra
Canberra, ACT 2600
Australia
Email: [email protected]
|
Hi Alex,
I have been extending the
tarsier
andchameleon
frameworks recently to track multiple spots using average_position and track_blob. One problem I am facing now is that I need to draw a background grid inchameleon
, which will help me to align my optical systems in experiments. The to-be-implementedbackground_grid
requires similar parameters to the background_cleaner plus apitch
parameters to define the size of each grid cell.I had limited experiences with PyQt and know the basics of signal/slot mechanism but have not idea about QML and the OpenGL stuff I saw in
chameleon
. Could you please let me know if I could just copy thebackground_cleaner
class and implement a function to draw the grid inbackground_grid
? Will it be problematic if I invoke bothbackground_cleaner
andbackground_grid
?Thanks in advance!
Cheers,
Fanpeng
P.S. Below is a screenshot for tracking multiple spots using average position in each cell for your better understanding:
The text was updated successfully, but these errors were encountered: