View Single Post
  #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: 14
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