Go to Post ... if there is no standard against which you determine success, then you can never fail. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2015, 14:04
icq10 icq10 is offline
Registered User
no team
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Unknown
Posts: 24
icq10 is an unknown quantity at this point
Camera Vision and Dashboard at the same time

We are having some issues with our webcam on the robot. It works properly on the dashboard and shows everything, but when we try to use the camera image to use some vision detecting at the same time the dashboard is black, sometimes we see a flickering of a frame when we put our mouse over it.

We had the suspicion that we have too much processing going on behind the scenes, so we tried to lower the frame rate, but this does not seem to be the issue.

Is it in general possible to split the camera image and send it to the Vision VI AND to the Dashboard to see whats going on?
  #2   Spotlight this post!  
Unread 24-01-2015, 14:08
icq10 icq10 is offline
Registered User
no team
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Unknown
Posts: 24
icq10 is an unknown quantity at this point
Re: Camera Vision and Dashboard at the same time

Here is an image of the combination of both.
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	86
Size:	6.2 KB
ID:	17966  
  #3   Spotlight this post!  
Unread 24-01-2015, 20:08
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,753
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: Camera Vision and Dashboard at the same time

The best indication that your processing is expensive would be to look at the CPU usage of the roboRIO on the DS chart. It is the center button on the right side, red plot.

The image you attached shows the same image being sent to what I assume is a processing function and to an image display. If the processing functions do not wire in a destination image, the input is reused, and this can affect the display. It often shows up as a flicker of good images and images that have been thresholded with at mostly black color palette.

Note that this is only the case with the Image datatype in LabVIEW. All other types that are displayed are treated as by-value types. The control would happen before or would copy the data. But because images are so large, and the vision API was developed in the early 90's, it is a by-reference type.

One easy thing you can try is to right-click on the image display control and set it to Snapshot. This will store the data when written instead of reading it while the processing is underway.

Greg McKaskle
  #4   Spotlight this post!  
Unread 26-01-2015, 17:51
icq10 icq10 is offline
Registered User
no team
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Unknown
Posts: 24
icq10 is an unknown quantity at this point
Re: Camera Vision and Dashboard at the same time

Ok, after changing it to snapshot the dashboard camera works fine. We just found out that there is another error with our vision VI. Somehow it returns this error
Attached Thumbnails
Click image for larger version

Name:	error.PNG
Views:	32
Size:	12.8 KB
ID:	18002  
  #5   Spotlight this post!  
Unread 26-01-2015, 19:00
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,753
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: Camera Vision and Dashboard at the same time

If you get an error, you can generally right click on it and choose the command "Explain Error ...". If it isn't there, the Help menu at the top of the window always has it, but you will then need to type in the error number.

Doing it for the IMAQ error you posted, I get

IMAQ Vision: The image is not large enough for the operation.

The error is being produced by the function named IMAQ User Lookup.

So my suggestion would be to look more closely at this function call and the inputs to it. It expects the input and destination to be grayscale images.

Greg McKaskle
  #6   Spotlight this post!  
Unread 27-01-2015, 17:08
icq10 icq10 is offline
Registered User
no team
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Unknown
Posts: 24
icq10 is an unknown quantity at this point
Re: Camera Vision and Dashboard at the same time

Thanks, everything works now. Turned out to be an error in my vision script. The the path of reference file for shape match was not up to date. Fixed now.
Closed Thread


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 21:18.

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