Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception when enumerating camera properties #1

Open
gcschmit opened this issue Jul 23, 2024 · 2 comments
Open

exception when enumerating camera properties #1

gcschmit opened this issue Jul 23, 2024 · 2 comments

Comments

@gcschmit
Copy link

I'm running the calibrate jar file on a Raspberry Pi with PhotonVision v2024.3.1 installed. I'll attach the log from running the program and the settings.json from the camera server. I have a Arducam_OV2311 connected. The exception may be due to the second control property which is not named and has no value.

I run the following command from the terminal:

java -jar calib-photonvision-dev-beta-12-10-linuxarm64.jar -height 1200 -width 1600 -pxFmt kMJPEG -fps 10

The information captured in the log is displayed and then this exception:

Exception in thread "main" VideoException [edu.wpi.first.cscore.VideoException: wrong property type]
at edu.wpi.first.cscore.CameraServerJNI.getProperty(Native Method)
at edu.wpi.first.cscore.VideoProperty.get(VideoProperty.java:78)

I believe the intention is for this to be pulled into PhotonVision; so, fixing this may not be a priority at all, which is understandable.

settings.json
photonvision-2024-7-23_05-54-20.log

I don't have a development environment setup for OpenCV, WPILib, and Photonvision; so, I haven't done any additional debugging.

@tom131313
Copy link
Owner

@gcschmit You have the right idea but it may be worse than you think. I had a version that used OpenCV and then a version that added the WPILib camera Server for better flexibility with cameras. That was still somewhat lacking and the final destination was intended to be Photon Vision (PV) so the third version is a very hacked up appendage to a piece of PV. That's what you are executing here.

The fourth version was about 99.9% properly integrated with PV and is in my photonvision repository. I didn't know well the front end of PV and had no authority to change the layout so I had to turn over that repository to real PV developers to do the final couple of hours of work. But nobody volunteered to finish someone else's work. Also, the PV owners may have decided that this calibration guidance was unnecessary or at least not worth a few hours of work since their addition to PV of Mr. Cal.

I spent the last hour trying to remember how to compile. I never intended to build any of these repositories again since they are for PV (which likely has abandoned them). I don't remember how to build and can't find good notes. You are probably right about a new or non-standard property type not being recognized. The reason I jumped from OpenCV, to WPILib, to PV was exactly for this problem of managing the myriad camera parameters. Those organizations expend a lot of effort maintaining so many camera idiosyncrasies. I was in no position to fuss with any low level camera programs.

Sorry about the long useless response. I need to ask the PV folks if this calibration idea is of any use and maybe revisit the latest versions of OpenCV and WPILib to see if they do better with your camera.

Thanks for your comment.

@gcschmit
Copy link
Author

Thanks for the reply. I did notice that there is another PR other than yours with your code. So, perhaps there are still plans to integrate it....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants