Get current view as RGB matrix or similar

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
JMG
Posts: 287
Joined: Wed Dec 25, 2013 9:32 am
Location: Spain
Contact:

Get current view as RGB matrix or similar

Post by JMG »

Hi!

Is there a way to get the current scene image (2d) as a rgb/hsv/yuv/etc matrix or at least in a numpy-opencv-tractable form?

I would like to access the scene as if it was a video stream, but I only found how to save a png image and I want to avoid saving/erasing several times per second (if possible).

This is for an experiment about an aumented reality editor (using aruco tags and all that), following this idea:
https://www.youtube.com/watch?v=CzD48UkGsK8


Javier.
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Get current view as RGB matrix or similar

Post by Kunda1 »

Neato
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Get current view as RGB matrix or similar

Post by microelly2 »

In my experiments the write to filesystem time is not the bottleneck for performance.
but a solution for this problem is welcome.
Post Reply