Go to Post I owe a debt, as many FIRSTers do, to the entire organization as a whole. Every team, every student, every person involved has help make FIRST what it is today. This is my Thank You. ~Anonymous - BandChick [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-12-2016, 16:04
JDub JDub is offline
Registered User
FRC #4579
 
Join Date: Dec 2016
Location: Renton, WA
Posts: 2
JDub is an unknown quantity at this point
Display Mat Images On SmartDashboard?

I'm investigating having the team do some vision processing this year. GRIP seems like a great tool. It looks like we could use the VideoCapture class to grab an image from the camera and then run it through the image processing pipeline generated from GRIP. As a debug aid, I've found examples of how to overlay bounding rectangles and such onto the processed image, but it's not clear to me how to display the image with the overlayed info on the SmartDashboard. FRC ScreenStepsLive says to use the CameraServer class, but it uses the NIVision.Image class to represent images, not OpenCV's Mat class that is used by GRIP. Is there a way to display a Mat image on the SmartDashboard, or does anyone know of a method to convert a Mat image to a NIVision.Image image? Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-12-2016, 17:23
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Display Mat Images On SmartDashboard?

Converting Mat to NIVision.Image is probably too much work. Instead, you should create your own version of CameraServer that calls Imgcodecs.imencode() to create a jpeg instead of imaqFlatten().
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #3   Spotlight this post!  
Unread 15-12-2016, 17:37
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,068
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Display Mat Images On SmartDashboard?

If you can wait until kickoff, expect some changes then that will make this a whole lot easier.

Otherwise, as euhlmann said you'd probably have to implement your own CameraServer if you want to be able to do this now.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-12-2016, 18:48
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Display Mat Images On SmartDashboard?

If you really don't want to wait until kickoff, github is a great place to find cool new things.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #5   Spotlight this post!  
Unread 15-12-2016, 20:29
JDub JDub is offline
Registered User
FRC #4579
 
Join Date: Dec 2016
Location: Renton, WA
Posts: 2
JDub is an unknown quantity at this point
Re: Display Mat Images On SmartDashboard?

I can wait for kickoff. Thanks for the feedback everyone.
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 11:08.

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