22 May 2019 at 14 h 04 min #13522AnonymousInactive
I was wondering it is possible to add fish-eye cameras in SOFA. I am trying to add small fish-eye cameras around a surgical instruments and use the images to create a bird-eye view, however I haven’t find any information about the use of cameras in the simulator.
Moreover, if this is not possible I would like to create my simulation environment in SOFA and export it in Blender. Is there a repository with models of anatomical surgical setup ( instruments and human anatomy)?
Thank you in advance for your support with this matter.22 May 2019 at 18 h 26 min #13524Bruno MarquesParticipant
As-is in SOFA, there’s no way of changing the camera’s intrinsic parameters using exisiting components.
There is a plugin, called SofaCV (computer vision) that contains a component called CalibratedCamera, and that can take OpenCV-style camera calibration data in the form of:
– A 3×4 matrix encoding both extrinsic and intrinsic camera parameters
– the K, R, and t parameters as expressed in OpenCV
– A glModelView / glProjection matrix if you’re more comfortable with OpenGL
– A position, up/lookat/ vector, & projection matrix
This plugin is hosted at this address: https://gitlab.inria.fr/mimesis/ComputerVision/SofaCV, and while the plugin is Open source, Access is only given upon request I believe.
Otherwise, If you prefer going for your own implementation, I’d suggest to look into the VisualManager class (sofa::core::visual::VisualManager) That let’s you override the OpenGL camera parameters of your scene through the preDrawScene / postDrawScene methods.
If you want to go for the SofaCV plugin, If you want to go for the SofaCV plugin, I believe you would have to create an account on gitlab.inria.fr, and I should then be able to add you to the project’s members 🙂23 May 2019 at 7 h 11 min #13525AnonymousInactive
Thank you for your answer. As for the moment I just need to have a static scene and get the images I may will just create the model in SOFA and use it in another software. But I will consider to use the plugin in the future.
I am actually working in minimally invasive surgery applications, do you know if there are model already available?
Angela27 May 2019 at 15 h 17 min #13533HugoKeymaster
- SOFA Consortium
And thank you for your question on the forum!
I am glad to see Bruno’s help clarified your question about the fish-eye effect.
I can answer you about the question concerning the availability of models/anatomy in SOFA. The examples of medical simulations that you can see in SOFA online videos often use patient data. These data (even if anonymized) can not be provided in our open-source repository for legal reasons.
You can however find some geometry- and tool-meshes in SOFA/share/mesh. An example is provided in the simulation examples/Demos/liver.scn
I hope this helps, do not hesitate if you have any further question.
- You must be logged in to reply to this topic.