Go to Post What we may be looking at is a confusing situation and that can be confusing. - JaneYoung [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, 23:13
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Rectangle Processing code giving strange error

Following the directions provided, I replaced the standard Vision Processing VI in the 2012 Robot Project with the Rectangular Target Processing code. Everything is working well, except for the "color" filter. The two intensity filters work, but when I select the color filter, I get only a white box in the processed image window. In addition, the error "-1074396080" appears every few seconds, coinciding with massive lag. The setup I am running is a laptop (running updated Labview), classmate, crio, and axis 206 camera all plugged into a bridge. The only thing I can find out about the error code is that it is an IMAQ error. Please help, I have no idea what to do. The only clue I have is a post similar to mine from 2009, but there is only one response and I cannot understand the instructions.
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2012, 07:50
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,752
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: Rectangle Processing code giving strange error

If you want to look up an error code, you can go to the help menu>>Explain Error and type it in.

The error simply says that the image is of the wrong type. IMAQ uses type to describe things like color, monochrome, or black and white.

I haven't seen this error, so I can't do much more than speculate what is going on. My guess is that when you flip to the color processing, your camera is not being changed to color -- the enable color property gets swapped. Or it gets flipped back and forth due to a logic change. Or perhaps it gets flipped, but the camera still has a few frames in the queue.

If this stabilizes and only happens when you first flip the tab, I guess you can go with the 3rd explanation and possibly rip out the stuff you aren't using. Otherwise, can you probe to see what type of image is coming out of the Camera Get function, and see if that explains it?

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2012, 14:12
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Rectangle Processing code giving strange error

I will get rid of the extra code for the other 2 filtering modes tonight and see if that works. Thanks for your help!
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2012, 19:59
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Rectangle Processing code giving strange error

I tried removing the vestigial code, but to no avail. Image coming in is black and white (not sure if it's supposed to be like that?), and there is also a "mask" going into the targeting VI as well. The image comes out blank. I can't tell where it goes wrong.

I've attached a picture of the vision processing VI. The VI with the red box around it is where something is going wrong.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	25
Size:	109.6 KB
ID:	11825  
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2012, 20:11
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,752
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: Rectangle Processing code giving strange error

In the attached code, it looks like the Color Enable is being set to FALSE each loop iteration. That requests that the camera return a monochrome image, and the JPEG decoder will return a monochrome 8 bit image. That starts the error chain because the color threshold requires a color image.

Change the enable constant to True and see if that helps.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2012, 20:33
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Rectangle Processing code giving strange error

It worked! Now I just have to work on the tracking part. In other news, our code appears to be "disconnecting" every few seconds. I wouldn't have noticed this at all, but I saw that the "Robot Code" light on the dashboard flashes red every few seconds. Is this because the vision VI is taking up to much CPU power? There are no unusual error codes.
Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2012, 20:43
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,752
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: Rectangle Processing code giving strange error

The charts tab on the DS will give you the CPU usage. It is very easy for vision to use up whatever CPU you have, so it is certainly possible. You can try to change the frame rate of the camera in Begin.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 09-02-2012, 21:09
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Rectangle Processing code giving strange error

Thank you again, your help turned a painful night into a productive one.
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 22:30.

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