Image Segmentation

Hey, following problem: I want to generate images from UE4 for a deep learning segmentation task, thus I need pixel precise annotation. As suggested in other posts I am using a SceneCaptureComponent2D with a post process material attached that uses custom render depth / custom stencil. This is all fun and working so far except for the following problem: The segmentation generated suffers from some kind of “image interpolation” best described in this image :

269800-problem.png

This seems like not much but for gray scale “annotation” this is actually doing a lot of damage for me.

This is the setup of my post process shader:

269811-pp-shader.png

I already deactivated any form of AA, Bloom, Eye Adaption on the capture component. So if anyone could point me into either direction of the problem causing this effect, or a possible solution to this I would be very grateful!

Ok… False alarm. The problem has been the image viewer… >.<

One further pitfall: I use IImageWrapper to save to disk, for your segmentation be sure to use

imageWrapper->GetCompressed(EBitmapCompression::PNG)

otherwise you will experience compression artifacts that will mess up your data.