So it looks like last years part of the library has been outdated or designed for the Crio not the robotRio. I think first wants us to use NIVision.imaq but theres a problem with the native libraries and the lack of documentation.
Code:
NIVision.IMAQdxGrab(Robot.session, Robot.RGBImage, 1);
NIVision.imaqSavePattern(Robot.RGBImage, "imagergb.png");
NIVision.imaqColorThreshold(Robot.GREYImage, Robot.RGBImage, 255, NIVision.ColorMode.HSL, RobotMap.HueRange,RobotMap.SaterationRange,RobotMap.ValueRange);
NIVision.imaqFillHoles(Robot.GREYImage,Robot.GREYImage, 4);
GetParticleInfoResult resault = NIVision.imaqGetParticleInfo(Robot.GREYImage, 4, NIVision.ParticleInfoMode.ALL_INFO);
ParticleReport[] array = resault.array;
SmartDashboard.putNumber("NumberOfParticles", array.length);
for (int i = 0; i < array.length; i++) {
targetFound(array[i], i++);
}
error given
Code:
/usr/local/frc/JRE/bin/java: symbol lookup error: /var/volatile/tmp/libwpilibJavaJNI3257654380311841301.so: undefined symbol: imaqGetParticleInfo
but with the native libraries it seems like its missing the getparticleinfo class with the java wrapper.