Register the camera view for some post-processing

Is it possible to register (or make sometimes captures ) the camera view in order to make then some post-processing on it?

Added an example(needs latest git) which shows how to ‘read’ composited screen image:

Or if you want to add custom rendering pass:

Not sure if this is exactly what you are after - let me know with more details.

1 Like

@lubos thanks for links

The rendering pass is very interesting but I wonder if it’s what I need !?.

The need if finally simple: how to get a file / buffer where to read video/pictures taken by a camera … like if you where reading a real image/video and then make some post-processing.
( like in applications of image recognition/computer vision => allows applications using specific deep learning algorithms to understand images or videos (images are data in the sense that they are inputted into an Neural Network, the NN trains and then the NN outputs a solution provided by the image. )

@lubos to be more concreat

From a 3D object that has been trained in the NNA (shooting from several angles in Armory; NNA here IA, Python and Armory 3d/Blender), the objective is to locate this object in the images taken by the Camera during a game, like with a Kalman filter.

So I need to crop a current Camera frame using a search region, which becomes the input vector for the NNA.

My question is what’s the best way to get this Camera frame in real-time during a game as an input for some treatments in Haxe/Node in Armory ?

Thus for the moment, the example Lubos proposed seems the best with the access to final composited image that is afterwards drawn to the screen with the code var image = RenderPathCreator.finalTarget.image;

in the trait of the example screen-image , is it possible then to get the result of g.drawScaledImage like an Array of pixels ?

(The for example gives nothing… ;
then if we do a trace(image) or trace(g), we get interesting things like if it was an enum with Arrays of pixels in it, but it seems that we can’t have access to those Arrays at the Haxe code level, but rather in the js code generated after for the html5 …)

should we consider saving the image from software external to Armory?
or use the Haxe extension-screen as thereafter

import extension.screenshot.Screenshot;

class SimpleExample {
function new(){
// You too can define a area for saving
Screenshot.capture(screen, new Rectangle(0, 0, 200, 200), “tmp”);

For those concerned : thanks to @lubos the getpixels will be available in next release for html5 and already ok for krome.