Using a single node to process 2 input image files [closed]
I was reading a tutorial using OpenCV Image Processing (Python) in ROS and I got some doubts.
The exercise consists on:
Creating a new node to determine the angular pose of a pump housing using the OpenCV image processing library. The pump’s orientation is computed using a series of processing steps to extract and compare geometry features:
Resize the image (to speed up processing)
Threshold the image (convert to black & white)
Locate the pump’s outer housing (circle-finding)
Locate the piston sleeve locations (blob detection)
Estimate primary axis using bounding box
Determine orientation using piston sleeve locations
Calculate the axis orientation relative to a reference (horizontal) axis
Firstly, out of a static image file (.jpg) it creates a node just for making an image_publisher so that it's transferred to a topic. I don't get this point since the python scrip could just open it from the input image directory, isn't it?
Secondly, I was wondering if a node can publish two different topics or in affirmative previous case open two inputs.
In third place, if the mentioned case is affirmative (1st Q), is it possible to create just a single node to do all the work? That is, getting the file inputs and output (a file) like a normal python script.
The point of everything is that I want to process two file images saved in a certain directory using a ros node which outputs a processed image file which should be saved in a certain directory.
Thanks for the support :)