View Single Post
  #4   Spotlight this post!  
Unread 20-01-2013, 09:34
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,750
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: Sample Vision Code, ComputeThreshold() exception

The IMAQ functions being used are documented here ... C:\Program Files (x86)\National Instruments\Vision\Documentation in the NIVisionCVI.chm file.

For the function imaqColorThreshold() it states that the return value is nonzero for success and zero for failure and states that imaqGetLastError() will give more detail. From what I see, that isn't happening, so the error is simply a generic threshold failure.

There are several requirements documented for the original function. These requirement include that the image type of the dest is a U8, that the source is a three element color, either RGB or HS(LVI). From statically looking at the code fragments you attached, I see nothing wrong, which is why it would be key to see what the error code tells us.

Greg McKaskle
Reply With Quote