Blenderproc: Post-processing with simultaneous access to multiple images

Created on 19 Feb 2021  路  2Comments  路  Source: DLR-RM/BlenderProc

Hi everyone,

thanks for this wonderful tool. It ended my search for an easy-to-use, yet customizable and also high-quality image rendering pipeline.

For a small experiment I am currently working on, I want to crop the images generated by BlenderProc to only show the contents of the bounding box around a specific object. To accomplish this, I generated a segmentation image and now wanted to crop the (color) image based on this image. However, looking at the code of the HDF5 writer and its post-processing modules, it looks like the images are fed individually to each post-processing module.

Is there a way (without modifying the source code of the HDF5 writer), to make use of multiple images during post-processing in the HDF5 writer module?

Best
Pascal

question first answer provided

Most helpful comment

Thanks for the quick answer!

I think I will for now go with simply cropping the images in a separate script. If I ever decide to write a modified HDF5 writer module, I'll make sure to let you know by re-opening a new issue with my code. Then you can decide whether this functionality is interesting enough for your use cases to incorporate it into your pipeline.

All 2 comments

Hey Pascal,

unfortunately are the postprocessing modules applied on each image individually, so you cannot access multiple images.
So, to accomplish your goal, you could either adapt the hdf5 writer module / write your own hdf5 module that extends it or you simply write a script which you run after BlenderProc which goes over all generated hdf5 files and does the cropping you described.

Let me know if you need any further help with that.

Thanks for the quick answer!

I think I will for now go with simply cropping the images in a separate script. If I ever decide to write a modified HDF5 writer module, I'll make sure to let you know by re-opening a new issue with my code. Then you can decide whether this functionality is interesting enough for your use cases to incorporate it into your pipeline.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manuelli picture manuelli  路  3Comments

elientumba2019 picture elientumba2019  路  4Comments

albertotono picture albertotono  路  3Comments

ttsesm picture ttsesm  路  3Comments

soans1994 picture soans1994  路  3Comments