Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:00:23+00:00 2026-06-01T06:00:23+00:00

I’m using the vision routines to capture frames (grab) from a 300fps GigE camera.

  • 0

I’m using the vision routines to capture frames (“grab”) from a 300fps GigE camera. The camera can deliver frames a little faster than the HD can write them, so I’m capturing in one loop and sticking them in a queue which is read out in a second (adjacent/parallel) loop. Everything goes fine until the first loop finishes (as far as I can tell), meaning that the data has all been acquired, most has been written, and the remainder just needs to be written out. Unfortunately, all of the images left in the queue magically retroactively all end up with the same data, so the last part of the data set contains hundreds of static frames.

How do I avoid this behavior? I assume that there’s some resource I need to hold on to so that image buffer memory isn’t reclaimed, but it’s obviously not the images themselves. (I do not do any explicit camera cleanup stuff there.)

Here’s an ASCII-art depiction of what I’m doing (at least I hope this is the relevant part):

          +===============+   +==========+
-queue----@-------Insert--@---@-Empty?---@---Release queue
       |  # GrabImg-^     #   #  |       #
       |  #               #   #  Y->Stop #
       |  # i-(>n?)->Stop #   +==========+
       |  +===============+
       |
       |  +==============+
       \--@-Deleted?--Y  #
          #  |        |  #
          #  N->Get   |  #
          #      |    v  #
          #    Write Stop#
          +==============+

I’m using queue deletion to signal the end of the loop. It’s a bit sloppy, granted, so I could understand an off by one error, but not an off-by-2200 error, which is the worst that I’ve seen. (And again, it does write all the images, they’re just all the same at the end.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:00:24+00:00Added an answer on June 1, 2026 at 6:00 am

    In a producer-consumer loop the producer needs to copy the image so that it’s not overwritten at the next iteration if consumer hasn’t processed it. GrabImg does not do this step, so you need to create a new one before each grab, and have the consumer take care of releasing each buffer it has processed.

    Beware of memory issues though!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.