Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. libvoxl-cutils camera_image_metadata.h

libvoxl-cutils camera_image_metadata.h

Scheduled Pinned Locked Moved Ask your questions right here!
2 Posts 2 Posters 492 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KnightHawk
    wrote on last edited by
    #1

    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);
            }
        }
    }
    
    Alex KushleyevA 1 Reply Last reply
    0
    • K KnightHawk

      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);
              }
          }
      }
      
      Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #2

      @KnightHawk , the definition is in libmodal-pipe library.

      Link Preview Image
      library/include/modal_pipe_interfaces.h · master · voxl / VOXL SDK / Core Libs / libmodal-pipe · GitLab

      This is a library to support named-pipe communication between a local server and multiple local clients. This is used for the voxl-imu-server.

      favicon

      GitLab (gitlab.com)

      Alex

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      ModalAI
      Categories Recent Tags ModalAI.com Docs
      © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups