Intercepting images before they are published
I can successfully publish video frames from my Raspberry Pi 4 (running ROS melodic on a Ubuntu 18.04 image) to a topic using the raspicam node (found here) and see those images on my computer. However, I would like to do some image processing on the raspberry pi before publishing the frames. Is there any way to do this without subscribing to the output of the node and then re-publishing the images to a separate namespace? Is it possible to edit any of the properties of the package to allow a python (or C++) script to process the frames before they are published?
I have been trying to figure out which part of the package is directly responsible for pulling the images from the camera as this seems like an ideal place to have the script run. I'm still fairly new to ROS so am not sure what I am looking for.
Any help for any of these questions would be greatly appreciated.