Go to Post Any school official who isn't tickled pink by hundreds high school students, and teachers, and parents, and mentors spending their weekend celebrating STEM isn't a school official worth having. - Ian Curtis [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

 
Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 01-24-2015, 03:29 PM
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 189
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
USB Camera on C++ SmartDashBoard

Hi there! We are having trouble getting an image of a USB camera on to the C++ Smartdashboard. We have the video feed on the Default smartdashboard and it works fine, however when we change to the C++ dashboard we get the error "Huffman table 0x00 was not defined".

Any ideas?
Thanks,
Team 2053
Reply With Quote
  #2   Spotlight this post!  
Unread 01-31-2015, 02:14 PM
codedr codedr is offline
Registered User
FRC #0537
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Wisconsin
Posts: 68
codedr will become famous soon enoughcodedr will become famous soon enough
Re: USB Camera on C++ SmartDashBoard

We are facing the same issue. I saved an image coming from the roborio and decoded the jpeg header.

The jpeg image coming from the camera is part of a mjpeg stream. According to https://www.ffmpeg.org/ffmpeg-bitstream-filters.html, the jpeg image is missing the DHT (huffman table) section.

> Unfortunately, these chunks are incomplete JPEG images, because they lack
> the DHT segment required for decoding.
> Quoting from http://www.digitalpreservation.gov/f...d000063.shtml:
>
> Avery Lee, writing in the rec.video.desktop newsgroup in 2001, commented
> that "MJPEG, or at least the MJPEG in AVIs having the MJPG fourcc, is
> restricted JPEG with a fixed – and *omitted* – Huffman table. The JPEG
> must be YCbCr colorspace, it must be 4:2:2, and it must use basic Huffman
> encoding, not arithmetic or progressive. . . . You can indeed extract the
> MJPEG frames and decode them with a regular JPEG decoder, but you have to
> prepend the DHT segment to them, or else the decoder won’t have any idea
> how to decompress the data. The exact table necessary is given in the
> OpenDML spec."
>
> This bitstream filter patches the header of frames extracted from an
> MJPEG stream (carrying the AVI1 header ID and lacking a DHT segment)
> to produce fully qualified JPEG images.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-01-2015, 12:58 PM
dougwilliams's Avatar
dougwilliams dougwilliams is offline
Engineer - Controls, Electronics
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: May 2013
Rookie Year: 2013
Location: Vestal, NY
Posts: 109
dougwilliams is on a distinguished road
Re: USB Camera on C++ SmartDashBoard

Quote:
Originally Posted by codedr View Post
We are facing the same issue. I saved an image coming from the roborio and decoded the jpeg header.

The jpeg image coming from the camera is part of a mjpeg stream. According to https://www.ffmpeg.org/ffmpeg-bitstream-filters.html, the jpeg image is missing the DHT (huffman table) section.

...
That's good info. I still don't understand why it works fine with the default Dashboard vs the C++ dashboard. My guess is the RoboRio is transporting the exact same stream to the Driver Station in either case, and for some reason using the C++ dashboard it fails.

I asked in another thread if anyone could explain what the difference is between the C++ dashboard and default dashboard, and no one can explain that, either.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-03-2015, 07:27 AM
ericomoura ericomoura is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Brazil
Posts: 12
ericomoura is an unknown quantity at this point
Re: USB Camera on C++ SmartDashBoard

I'm not sure this will solve your problems, but, after having the same problem, I searched around and found out that this error showed up when you were using a 64-bit environment. What I did was download the 32-bit Java (even though the computer was still 64-bit) and that specific error went away.

We still don't have the camera working, but at least that one error was fixed! Still trying to have camera images on the SFX SmartDashboard (or the C++ dashboard if that's all we can do). Our idea was to try and use two cameras, but we can't even figure a single one out...
Reply With Quote
  #5   Spotlight this post!  
Unread 02-03-2015, 02:33 PM
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 189
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: USB Camera on C++ SmartDashBoard

Quote:
I'm not sure this will solve your problems, but, after having the same problem, I searched around and found out that this error showed up when you were using a 64-bit environment. What I did was download the 32-bit Java (even though the computer was still 64-bit) and that specific error went away.

Yeah, we have tried that. However, the error did not go away when we did that. Now, it has gotton worse because we cant launch the C++ dashboard from the driverstation. We are working around this issue by just making a shortcut to the desktop and launch the dashboard from there.

And we still have not solved the issue of getting the camera on the C++ dashboard. We will probably just end up using the Axis camera.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-04-2015, 01:15 AM
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is offline
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,547
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: USB Camera on C++ SmartDashBoard

We ran into this issue tonight as well (in Java). we weren't able to fix it for the simple camera example or for AutomaticCapture but the Intermediate Vision example was able to run just fine for us on regular SmartDashboard.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
Reply With Quote
  #7   Spotlight this post!  
Unread 02-04-2015, 02:35 AM
ElJeffe3255's Avatar
ElJeffe3255 ElJeffe3255 is offline
Registered User
AKA: El Jeffe
FRC #3255 (SuperNURDS)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Escondido, CA
Posts: 14
ElJeffe3255 is an unknown quantity at this point
Re: USB Camera on C++ SmartDashBoard

Quote:
Originally Posted by ericomoura View Post
I'm not sure this will solve your problems, but, after having the same problem, I searched around and found out that this error showed up when you were using a 64-bit environment. What I did was download the 32-bit Java (even though the computer was still 64-bit) and that specific error went away.

We still don't have the camera working, but at least that one error was fixed! Still trying to have camera images on the SFX SmartDashboard (or the C++ dashboard if that's all we can do). Our idea was to try and use two cameras, but we can't even figure a single one out...
The following thread has a WPI person indicating that USB cameras on SFX dashboard is not supported:

http://www.chiefdelphi.com/forums/sh...d.php?t=133421
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 09:15 AM.

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