erik
Really appreciate the thorough response. I am having trouble with fps and will explore blocking/non blockign to try to get the fps up.
I have set the rgb camera at 30 fps that goes into manip 1 to downscale small so it doesn't take much bandwidth:
camRgb = pipeline->create<dai::node::ColorCamera>();
camRgb->setPreviewSize(st->rgb_dai_preview_x, st->rgb_dai_preview_y);
camRgb->setResolution(st->rgb_dai_res);
camRgb->setInterleaved(false);
camRgb->setColorOrder(dai::ColorCameraProperties::ColorOrder::RGB);
camRgb->setBoardSocket(dai::CameraBoardSocket::RGB);
camRgbManip = pipeline->create<dai::node::ImageManip>(); camRgbManip-> initialConfig.setResize(408, 240); camRgbManip->initialConfig.setFrameType(dai::ImgFrame::Type::BGR888p); camRgb->preview.link(camRgbManip->inputImage);
rgbOut = pipeline->create<dai::node::XLinkOut>();
// Here I will take the camRgb frames and downscale them before sending them out
rgbOut->setStreamName("rgb");
I link manip 1 to xlinkout
camRgbManip->out.link(rgbOut->input);
// camera Properties
camRgb->setFps(st->rgb_dai_fps);
camRgb->setPreviewNumFramesPool(10);
The pool also goes to manip 2 to resize for a person detection nn:
person_det_manip = pipeline->create<dai::node::ImageManip>();
person_det_manip->initialConfig.setResize(544, 320); // This seems to downscale it by 1/3 (544x320)
person_det_manip->initialConfig.setFrameType(dai::ImgFrame::Type::RGB888p);
camRgb->preview.link(person_det_manip->inputImage);
So I believe that means the preview frames go to 2 different manips. manip 1 goes to XlinkOut, manip 2 goes to MobileDetectionNetwork.
I have my output queues like so:
// Set up the output queues
for (const auto &name : {"rgb", "detection", "recognition"}) {
queues[name] = device->getOutputQueue(name, 10, false);
}
And I calculate fps for each of the queues:
if (queues["rgb"]->has()) {
auto rgb_message = queues["rgb"]->get();
sync.add_msg(rgb_message, "color");
current_rgb_frame_counter++;
uint64_t capture_timestamp = CurrentTimeMs();
auto framesASecond = (float)current_rgb_frame_counter/((float)(capture_timestamp - start_time)*.001);
auto fps_string = std::to_string(framesASecond);
std::cerr << "color fps: " << fps_string << std::endl << std::flush;
}
I cannot get the color fps sent after manip 1 through xlink to go higher than 10fps. Is it known that ImageManips can't operate at faster than 10fps?
color fps: 10.808226
recognition fps: 7.240854
detection fps: 9.986684
(reducing to 1 manip and xlinking out the person
detection
_manip
doesn't increase the fps, still ~10 fps)