I’ve been trying to get a cropped image of the detection through the ROS deep learning DetectNet. This isn’t the complete function below, but snippets of what was added. The message for ROS and the cropping. The publishing code works when I send out the input_cvt. I’ve created a third cvt called cropped_cvt for the cropped image. I’m stuck at knowing how to get the cropped image data (imgOutput) into the ROS sensor_msg::image format. I see how it was done for the overlay and it used a cvt. I’m unsure how to get the cropped data in a form to do that same with it.
I’ve also tried this after creating a cropped_cvt. The result is the original image without a crop, but at least there is an image published. Not sure why it wouldn’t be cropping the image.
Thank you! This is what I ended up with and I had a few extra questions. I believe the internal format is what I want for the imageConverter. Is that true?
since the image is always resizing do you know of a way to see this image? It seems to be rotating or some other processing at times, and I’d like to verify first.