Go to Post You know, sometimes it is really cool to be a geek! - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 08-02-2016, 22:19
gruffen gruffen is offline
Registered User
FRC #1648
 
Join Date: Jan 2016
Location: Atlanta
Posts: 3
gruffen is an unknown quantity at this point
Axis camera not retrieving images

Hi all,

So we decided to switch to the Axis 206 for vision processing, and so far we've been unsuccessful in grabbing images to process and sending them to dashboard.

The connection appears to be set up (I can see the camera feed in the LabVIEW dashboard when I select "IP Camera"), and there seems to be no other errors. The images don't show up at all.

Here is the code we've been using:

Code:
package org.usfirst.frc.team1648.robot;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

import com.ni.vision.NIVision;
import com.ni.vision.NIVision.Image;
import com.ni.vision.NIVision.ImageType;

import edu.wpi.first.wpilibj.vision.AxisCamera;
import edu.wpi.first.wpilibj.CameraServer;

public class Robot extends IterativeRobot {

 int session;
    Image frame; 
    Image binaryFrame;
    AxisCamera camera;

 public void robotInit() {
 frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);
		binaryFrame = NIVision.imaqCreateImage(ImageType.IMAGE_U8, 0);
}
public void teleopPeriodic() {
        while (isOperatorControl() && isEnabled()){
        	SmartDashboard.putNumber("Number of particles", 0);
        	grabImage();
        	Timer.delay(0.005);
        }
    }
Nothing appears to be wrong, and we can't figure out why. Thanks for the help!
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


All times are GMT -5. The time now is 08:54.

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