![]() |
How to view a binary image
I'm working on refining my auto aim code and noticed a couple bugs when the robot is looking from a certain angle. Is there a way i can save the binary image to the robot in a format maybe MS paint could open so i could view the image and check to make sure my code it right? Here is what i have for my camera function:
Code:
public void cameraCapture() throws AxisCameraException, NIVisionException {Code:
critCollection.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, 30, 400, false); |
Re: How to view a binary image
Just as a guess, you could use ObjectMemorySerializer.save() to save a serialized image to the CRIO's memory, then FTP to get it and find a way to convert it from a desktop setting. I'm sure you aren't talking about converting it onboard the computer right? You wouldn't be opening ms paint during competition. :p As to how to convert it, you could use a java library that allows you to construct jpeg/bmp/png/gif/etc using pure data and use the wpilibj.jar to access the serialized object you saved. Probably a complex answer, but I've never done it so I don't know a better way.
|
Re: How to view a binary image
It's way easier than what Joel suggested. Just call ImageName.write(/ImageName.bmp) then FTP to the cRIO (no client needed, jut type FTP://10.XX.YY.2 in Windows Explorer) to get the image. Replace ImageName with the name of your image and you should be good to go. Note that .jpeg does not appear to work with binary images, but .bmp does.
|
Re: How to view a binary image
Quote:
|
| All times are GMT -5. The time now is 10:04. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi