Hi all,
I have an OAK-D-PoE camera which I use in a OpenCV program. One reason why I chose the camera, was the FOV of 69x55 (HFOVxVFOV).
I got the camera working, but I just can't get the FOV right to use the 69x55 FOV (as mentioned on the product page https://shop.luxonis.com/products/oak-d-poe). Instead I get a FOV of 43.6x34.6, which is way to small for my software. How do I get to use the full FOV?
When I use the depth camera, the FOV does seem to match the depth FOV mentioned on the product page (72x49).
The code I use for the RGB camera is: (an edited version of rgb_preview.cpp)
#include <iostream>
// Includes common necessary includes for development using depthai library
#include "depthai/depthai.hpp"
int main() {
using namespace std;
// Create pipeline
dai::Pipeline pipeline;
// Define source and output
auto camRgb = pipeline.create<dai::node::ColorCamera>();
auto xoutRgb = pipeline.create<dai::node::XLinkOut>();
xoutRgb->setStreamName("rgb");
// Properties
camRgb->setPreviewKeepAspectRatio(false);
camRgb->setPreviewSize(1920,1080);
camRgb->setBoardSocket(dai::CameraBoardSocket::RGB);
camRgb->setResolution(dai::ColorCameraProperties::SensorResolution::THE_1080_P);
camRgb->setInterleaved(false);
camRgb->setColorOrder(dai::ColorCameraProperties::ColorOrder::RGB);
// Linking
camRgb->preview.link(xoutRgb->input);
// Connect to device and start pipeline
dai::Device device(pipeline, dai::UsbSpeed::SUPER);
cout << "Connected cameras: ";
for(const auto& cam : device.getConnectedCameras()) {
cout << cam << " ";
}
cout << endl;
// Print USB speed
cout << "Usb speed: " << device.getUsbSpeed() << endl;
// Output queue will be used to get the rgb frames from the output defined above
auto qRgb = device.getOutputQueue("rgb", 4, false);
while(true) {
auto inRgb = qRgb->get<dai::ImgFrame>();
// Retrieve 'bgr' (opencv format) frame
cv::imshow("rgb", inRgb->getCvFrame());
int key = cv::waitKey(1);
if(key == 'q' || key == 'Q') {
break;
}
}
return 0;
}