Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   flatten image for Dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=93112)

kamocat 02-03-2011 00:06

flatten image for Dashboard
 
1 Attachment(s)
I'd like to send modified images to the Dashboard using the same mechanism that the "send to PC" VI uses.
In order to do that, I need to compress the image the same way the camera does.
I've tried with the IMAQ compression, but didn't have success with the default Jpeg compression values.

I've uploaded my test VI, and would appreciate any suggestions or insight.

Thanks!

ATH1RSTYM00SE 02-03-2011 12:31

Re: flatten image for Dashboard
 
I can exactly see your code cause im on a school sanctioned laptop but what i believe you need to do is in your teleop vi whatever you want to send to the dashboard flatten it to a string and use the block set user data high. Then go to your dashboard project and find where the user dat high comes out. There should be a disabled block around an unflatten from string block. remove the disabled block and attach whatever kind of indicator you want. If you want to add more then one thing to the dashboard You have to flatten everything in teleop, and bundle it. in the dashboard project you need to unbundle the unflatten from string, set the data type to bundle and specify what kind of value you will be passing by attaching things to the bundle Then you can attach indicators to the unbundle. Hope this helps and is clear considering i did it entirely off of memory:)

kamocat 02-03-2011 19:52

Re: flatten image for Dashboard
 
That is a thorough description of how to send the camera image using the Dashboard High Priority data.
Unfortunately, that's not what I'm asking.
The "send image 2 PC" VI called in the "Open Camera" VI sends the camera image, still compressed, to the Driver Station IP address on TCP port 1180.
This works with the default dashboard. I see advantage in using the default dashboard.

What I plan to do is modify the "send image 2 PC" so that I can send modified images (showing the target as a green rectangle) when I'm processing to find the target, and send the normal image when I'm not.

In order for the Driver Station to receive these modified images as it normally does, they need to be encoded the same way. THAT is what I'm having trouble with.

Alan Anderson 03-03-2011 09:07

Re: flatten image for Dashboard
 
Quote:

Originally Posted by kamocat (Post 1033830)
What I plan to do is modify the "send image 2 PC" so that I can send modified images (showing the target as a green rectangle) when I'm processing to find the target, and send the normal image when I'm not.

Such a modification would be a large change to how it does what it does, and would greatly increase the amount of processing required on the robot. The typical advice is to send the target coordinates in the dashboard data and let the Dashboard program overlay the rectangle on the received image.

kamocat 03-03-2011 11:16

Re: flatten image for Dashboard
 
That's a good idea. Thanks.


All times are GMT -5. The time now is 09:30.

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