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
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.
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.