Go to Post I'm pretty sure there is a federal sequester on the bandwidth coming out of LSR. - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 08-02-2010, 16:32
PranavSathy PranavSathy is offline
Team Captain
AKA: Pranav Sathyanarayanan
FRC #0263 (Sachem Aftershock)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Holbrook, New York
Posts: 27
PranavSathy is an unknown quantity at this point
Re: Displaying Camera Image in C# Dashboard

The Dashboard Code from LabVIEW doesnt help at all , ive read through the whole thing countless times, the PCVideoServer.cpp I have also read through that code,infact I am sitting right in front of it lol, that is why there is a if(readBytes > 1000) code, it makes sure I am not sending the header or imageSize as parameters to the MemoryStream, actually after much testing, i got the image to display at about .01 fps rofl, it updates the image irregularly and it is lagging BEYONG belief, here is my current code for that image processing:

Code:
if (netStream.DataAvailable)
                {
                    image.indicator.Text = "Data Available";
                    //image.videoStream.Image = Image.FromStream(netStream);
                    data = new byte[serverClient.ReceiveBufferSize];
                    
                    //bytesRead = netStream.Read(data, 0, serverClient.ReceiveBufferSize);
                    bytesRead = client.Receive(data, 0, serverClient.ReceiveBufferSize, 0);
                    //tw.WriteLine(DateTime.Now + " " + bytesRead.ToString());
                    if (bytesRead > 1000)
                    {
                        try
                        {
                            MemoryStream ms = new MemoryStream(data);
                            image.videoStream.Image = Image.FromStream(ms, false, true);
                        }
                        catch (Exception ex)
                        {
                            tw.WriteLine(DateTime.Now + ex.ToString());
                        }
                    }
                }
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Labview Dashboard not displaying camera. GunfighterJ NI LabVIEW 1 02-02-2010 19:20
Reinstall of dashboard doesn't fix camera image streaming ellisk Programming 2 20-01-2010 08:04
[Help Needed] Camera to Dashboard basicxman C/C++ 1 19-01-2010 18:20
Can we use the camera image on Dashboard this year? Jon236 Programming 1 11-01-2010 12:52
Only Camera works in Dashboard keehun Programming 1 06-01-2009 07:22


All times are GMT -5. The time now is 13:44.

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