Go to Post I gave up football and a chance to be ignorant the remainder of my hs career....so ive gained more than loss - TheNotoriousKid [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2012, 05:51
NeatTeam NeatTeam is offline
Registered User
FRC #1943
 
Join Date: Jan 2012
Location: Israel
Posts: 56
NeatTeam is an unknown quantity at this point
Saving images to global variables

We are trying to detect the baskets using vision proccessing, but in order to not slow the code by always running the vision proccessing, we want to use a script that uses only two images. The script works great in the vision assistant, but in order to run the script in labview we have to find a way to save two different images into two different global variables (When we press one button we want to save the first image, and when we press another button we want to save the second image), so we can set them as the input for our script VI, which will run in the Teleop VI only when required.

So far we haven't been able to successfully save the two images into two global variables, and we would really appreciate any help there.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2012, 04:40
NeatTeam NeatTeam is offline
Registered User
FRC #1943
 
Join Date: Jan 2012
Location: Israel
Posts: 56
NeatTeam is an unknown quantity at this point
Re: Saving images to global variables

Please, we really need help, does anybody know how to do that?

Last edited by NeatTeam : 11-02-2012 at 05:46.
Reply With Quote
  #3   Spotlight this post!  
Unread 11-02-2012, 07:53
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Saving images to global variables

OK. I'm not so sure that this vision method is likely to work, but I'll explain what to do to hold onto two images.

The IMAQ palette has a subVI called IMAQ Copy. It will store the pixel contents of an image into another image allocation so that you can use it later.

So be sure to allocate each image with a unique name, don't just branch the wire. As for using globals, you can store the IMAQ refnums in the globals, or you can access them by name using the IMAQ functions.

Greg McKaskle
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi