We’ve been doing vision processing via a HTML server, but the problem is the drivers don’t like to use all of the programs including RoboRealm so we want to do it in Java. ColorImage does not support per-RGB scanning but Squawk doesnt support BufferedImage. any help?
Last year one of our students wrote image processing code in Java.
We used the command based robot template. The camera Code resides within a subsystem.
The code is available here for reference:
Hopefully that helps get you moving in the right direction.
Something to watch out for is performance. The frame rate can get pretty low for image processing running cRIO side. You may want to look at performing your vision processing using openCV through the smartdashboard. Vision processing code would run on on your driver station laptop in this case. There are plenty of good resources on driverstation side image processing code.
No… our current camera image code is fine :\ manufacturer grade quality at that, its just that the drive team doesn’t like using custom dashboards so we cant do offboard processing and we need to do it onboard, but dont want to use the sloppy nivision libs and do custom pbp.
I’m curious what you find sloppy about nivision?
I don’t find the NIVision libs sloppy; just unusable for any complex operations. So far as I know and have experimented, there is no way to interact with NIVision.Image type images except through NIVision methods. Also, there’s no way to create NIVision.Image type images other than with a webcam. Not only does this drawback leave many (including me) with no option other than using external libs, it makes CameraServer, which is compadible only with NIVision.Image images, useless. Please, if I’m wrong, correct me. I would like to use the utilities provided by default if I can.
- We used nivision for some pretty complex stuff last year.
- Have you seen imaqCreateImage? Or the (somewhat useful) documentation in Program Files\National Instruments\Vision\Help?
- It’s really not that hard to implement CameraServer yourself. It’s literally just the bytes 1 0 0 0 followed by a 32 bit integer n, followed by n bytes of a jpeg image. Over and over on a tcp stream
I stand corrected
I suppose that I didn’t look into NIVision deeply enough.