libvoxl-cutils camera_image_metadata.h
-
Hello,
I'm looking for a specific header so that I can access the camera data in my custom driver but I do not see it in https://gitlab.com/voxl-public/voxl-sdk/core-libs/libvoxl-cutils. Where can I find camera_image_metadata.h? Thanks.
// ---------------- Save Camera Feed (if enabled) ----------------- if (camera_pipe_fd != -1 && FD_ISSET(camera_pipe_fd, &rfds)) { camera_image_metadata_t meta; ssize_t ret = read(camera_pipe_fd, &meta, sizeof(meta)); if (ret == sizeof(meta)) { if (img_buffer.size() < meta.size) { img_buffer.resize(meta.size); } ret = read(camera_pipe_fd, img_buffer.data(), meta.size); if (ret == (ssize_t)meta.size) { cv::Mat image(meta.height * 3 / 2, meta.width, CV_8UC1, img_buffer.data()); char filename[128]; snprintf(filename, sizeof(filename), "/data/img_%s_%lld.jpg", TARGET_CAMERA_NAME.c_str(), (long long)meta.timestamp_ns); cv::imwrite(filename, image); } } } -
Hello,
I'm looking for a specific header so that I can access the camera data in my custom driver but I do not see it in https://gitlab.com/voxl-public/voxl-sdk/core-libs/libvoxl-cutils. Where can I find camera_image_metadata.h? Thanks.
// ---------------- Save Camera Feed (if enabled) ----------------- if (camera_pipe_fd != -1 && FD_ISSET(camera_pipe_fd, &rfds)) { camera_image_metadata_t meta; ssize_t ret = read(camera_pipe_fd, &meta, sizeof(meta)); if (ret == sizeof(meta)) { if (img_buffer.size() < meta.size) { img_buffer.resize(meta.size); } ret = read(camera_pipe_fd, img_buffer.data(), meta.size); if (ret == (ssize_t)meta.size) { cv::Mat image(meta.height * 3 / 2, meta.width, CV_8UC1, img_buffer.data()); char filename[128]; snprintf(filename, sizeof(filename), "/data/img_%s_%lld.jpg", TARGET_CAMERA_NAME.c_str(), (long long)meta.timestamp_ns); cv::imwrite(filename, image); } } }@KnightHawk , the definition is in
libmodal-pipelibrary.Alex
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login