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 7165361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:13:35+00:00 2026-05-28T14:13:35+00:00

For a course imaging processing I am building a Matlab/C++ application. Matlab should recognize

  • 0

For a course imaging processing I am building a Matlab/C++ application. Matlab should recognize hand gestures, and it should sent them to the C++ application. Our idea was to create a queue in matlab which we can read from C++. This works perfectly, however we have one problem:

We get the data from the webcam in an infinite while loop. Inside that loop we use assignin(‘base’,….) and evalin(‘base’,…) to send our commands to the workspace. However, those commands are only send after the loop has finished by clicking our stop button. This means that the C++ application can’t read the values realtime, it can only read the values after we stopped the image processing alltogether.

So is it possible to force matlab to write the variables to the base workspace so we can read those values with the c++ application from matlab?

EDIT:
Below a short description of how the program works:

The application start with the C++ application. The C++ application starts the Matlab engine, and calls the initialization script of the Matlab application. The initialization script starts a GUIDE gui, and by a press on a button the gesture recognition part starts. The gesture recognition part of the Matlab application is an infinite while loop which continuously gets a frame from the webcam input and processes that image. When a gesture is found, it uses evalin to write the gesture ID to a queue in the base workspace. Meanwhile the C++ application is also in an infinite loop which continuously checks if there are items in that Matlab queue. However, it won’t find any items until the Matlab script gets out of that while loop.
When I add items to the queue manually the C++ application will read those values immediately, and when I don’t use a while loop to capture frames continuously but a button to get individual frames manually the C++ application can also read the values immediately. So it seems that the while loop is blocking the C++ application to read the queue.

  • 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-05-28T14:13:36+00:00Added an answer on May 28, 2026 at 2:13 pm

    The solution I’ve created was quite simple: I put everything inside the while loop in a seperate function, and called that function every frame-update of the c++ application, instead of having 2 separate while loops.

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

Sidebar

Related Questions

Of course I know is possible to create a file with a certain size
My team is close to deploying our application, and we're about to go into
Imagine C# code like this ISomeInterface someVar = creator.Create(typeof(SomeClass), typeof(ISomeInterface)); What should happen? Method
Imagine I want to create an application which is very similar to MS Word
Imagine I have the following code (simplified regarding my real context of course): <div
Of course I am aware of Ajax, but the problem with Ajax is that
Of course most languages have library functions for this, but suppose I want to
Of course, there are a whole range of possible errors relating to document validity,
[ Of course, the question is not restricted to a specific friend implementation, feel
Of course, the immediate answer for most situations is yes , and I am

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.