1
$\begingroup$

I am planning on making an artificial neural network to control an object in blender game engine. The NN will be on the python script. I have never written a code on blender before. There are going to be multiple camera objects. I need the pixel data from specific cameras as input for the NN. How do I do this?

$\endgroup$
  • $\begingroup$ Not an expert, and not sure to understand, but a camera is just an object and has no "pixel data" of its own: you have to render an image seen through a camera to get a square array of pixels (an image) then you can read that image as any other one, I guess... $\endgroup$ – m.ardito Sep 26 '17 at 7:12
  • $\begingroup$ You can get the pixel data out of a camera by using docs.blender.org/api/blender_python_api_2_78a_release/… passing in your own buffer $\endgroup$ – sdfgeoff Sep 30 '17 at 11:12
  • $\begingroup$ @m.ardito hi can you give some quick code example of how you would do that (at ANY resolution?), I'm trying to do that now but I'm stuck on only 512 by 256 max resolution before it starts getting pixelated and buggy: blender.stackexchange.com/questions/128174/… $\endgroup$ – bluejayke Jan 10 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.