Go to Post If all you have to say are demeaning and vile comments, then shut your trap and keep it to yourself. - Ryan Dognaux [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 25-03-2016, 10:59
Bernstern Bernstern is offline
Registered User
FRC #2141 (Spartonics)
Team Role: Programmer
 
Join Date: Nov 2015
Rookie Year: 2015
Location: Clayton
Posts: 30
Bernstern is an unknown quantity at this point
NiVision inverting image

Does anyone know how to flip the live feed on the smart dashboard by 180 degrees basically inverting it in java?
__________________
Programmers, a species indigenous to robotics that can convert caffeine into code.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-03-2016, 13:02
soundfx's Avatar
soundfx soundfx is offline
Registered User
AKA: Aaron J
FRC #3238 (Cyborg Ferrets)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Anacortes, WA
Posts: 17
soundfx is an unknown quantity at this point
Re: NiVision inverting image

You can flip the image with the imaqFlip method in the NIVision class. This does require you to be setting the image using the setImage method in CameraServer and manually opening the camera and acquiring the image with NIVision.

This requires the following init code:

Code:
cam = NIVision.IMAQdxOpenCamera(frontCameraName, NIVision.IMAQdxCameraControlMode.CameraControlModeController);
frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);
NIVision.IMAQdxConfigureGrab(newID);
NIVision.IMAQdxStartAcquisition(newID);
Then add this to teleop:

Code:
NIVision.IMAQdxGrab(activeCam, frame, 1);
NIVision.imaqFlip(frame, frame, NIVision.FlipAxis.HORIZONTAL_AXIS);
CameraServer.getInstance().setImage(frame);
Reply With Quote
  #3   Spotlight this post!  
Unread 25-03-2016, 14:13
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: NiVision inverting image

What kind of camera are you using? Many IP cameras have an option to invert the image that they provide. That's there in case you have to mount a camera upside down for some reason. USB cameras typically require such inversion to be provided by the driver or user software the way Aaron describes, but maybe yours is atypical.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-03-2016, 13:21
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,752
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: NiVision inverting image

Look for configuration terms like mirror or rotation. Invert means something different.

I don't remember a camera that doesn't have this config option.

Greg McKaskle
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 08:27.

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