Jump to content

Check image input is valid


Recommended Posts

How/Why would a image be invalid?  If the reference could be invalid then Rolfk's response is a good start.  

 

There is are image info function that gives you the size and the type (RGB, U8 grayscale etc.) if that is the issue. (IMAQ GetImageInfo is the function).


If image content is the issue then you get a little harder, but guessing it will be one of the first two if the functions throw errors.

Link to comment
How/Why would a image be invalid?  If the reference could be invalid then Rolfk's response is a good start.  

 

There is are image info function that gives you the size and the type (RGB, U8 grayscale etc.) if that is the issue. (IMAQ GetImageInfo is the function).

If image content is the issue then you get a little harder, but guessing it will be one of the first two if the functions throw errors.

 

Of course there are different ways an image could be invalid. However considering he was looking for a simple LabVIEW VI "to check if the image data [of an input terminal] is valid or not" it seemed like a logical consideration that he might be looking for something along the lines of the Not a Number/Path/Refnum node. And since IMAQ images are in fact simply a special form of refnum too, which I think isn't obvious to most, I wanted to point out that this might be the solution.

 

He probably wants an easy way to detect if the input terminal received a valid image refnum. Anything else will require implementation specific use of one or more IMAQ Vision VIs to check if the specific properties or contents of the valid image reference meet the desired specifications.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.