FtcRobotController icon indicating copy to clipboard operation
FtcRobotController copied to clipboard

Calibration parameters for HD Pro Webcam C920 not automatically detected

Open mafteialbert opened this issue 2 years ago • 10 comments

When using a HD Pro Webcam C920 with the Vision Portal, the calibration parameters are not automatically detected. This happens due to a "mishap" from Logitech who has the same product registered under 3 different product ids: HD Pro Webcam C920 - 0x82D, C920 PRO HD Webcam - 0x08E5, C920 HD Pro Webcam - 0x0892(Note: I have the one with 0x0892).

For most teams the workaround is obvious: Copying the calibrations, changing the ids, and adding them to teamwebcamcalibrations.xml, but it would be ideal if the other product ids would also be registered in the SDK, in order to avoid confusing rookie teams(especially since it's stated that the SDK has the calibrations parameters for their camera).

mafteialbert avatar Oct 04 '23 14:10 mafteialbert

Thanks for the feedback. We are aware of the multiple C920 product ID issue, but we're unable to get a straight answer from Logitech regarding the difference in the devices or changes in the optics. We have also been unable to get hands on the device to verify that the calibration in the SDK is valid for all product IDs. The only way to properly verify is to perform the camera calibration process and compare the results.

  • https://ftc-docs.firstinspires.org/en/latest/apriltag/vision_portal/apriltag_camera_calibration/apriltag-camera-calibration.html

Are you able to perform this task and provide us with your results?

texasdiaz avatar Oct 04 '23 17:10 texasdiaz

Are you able to perform this task and provide us with your results?

I will to do the calibration and come back with the results.

mafteialbert avatar Oct 04 '23 18:10 mafteialbert

Hello, I've done the calibration. It wasn't particulary good(since some photos had some screen glare) but here are the parameters: Fx: 799.495, Fy: 799.495 Cx: 415.298 Cy: 307.494

mafteialbert avatar Oct 12 '23 13:10 mafteialbert

What resolution did you calibrate the camera at? Each resolution will have different calibration parameters.

texasdiaz avatar Oct 12 '23 19:10 texasdiaz

Oops, forgot to mention. It was 800x600

On Thu, Oct 12, 2023, 22:33 Danny Diaz @.***> wrote:

What resolution did you calibrate the camera at? Each resolution will have different calibration parameters.

— Reply to this email directly, view it on GitHub https://github.com/FIRST-Tech-Challenge/FtcRobotController/issues/745#issuecomment-1760252549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQOGBNTITUCHKMF4L5MUB63X7BAZ5ANCNFSM6AAAAAA5SYEPSA . You are receiving this because you authored the thread.Message ID: @.***>

mafteialbert avatar Oct 12 '23 20:10 mafteialbert

Bump

mafteialbert avatar Oct 20 '23 04:10 mafteialbert

This has been added for consideration for the 9.1 release, currently targeted for January 2024. This issue will remain open until this work has been completed.

texasdiaz avatar Oct 20 '23 05:10 texasdiaz

An FTC team has found another variant, for model "Logi Webcam C920e", with PID 0x08B6.

WestsideRobotics avatar Dec 13 '23 16:12 WestsideRobotics

I have a C920 with the PID 0x08B6. I have run through calibrations and here is the data the I got back with comparisons against the existing FTC values.

Resolution Source fx fy cx cy
640x480 FTC 622.001f 622.001f 319.803f 241.251f
640x480 My Camera 638.991 638.991 327.391 246.924
           
800x600 FTC 775.79f 775.79f 400.898f 300.79f
800x600 My Camera 791.489 791.489 400.403 313.946
           
640x360 FTC 463.566f 463.566f 316.402f 176.412f
640x360 My Camera 477.753 477.753 320.357 181.369
           
1920x1080 FTC 1385.92f 1385.92f 951.982f 534.084f
1920x1080 My Camera 1439.292 1439.292 947.996 550.08
           
800x448 FTC 578.272f 578.272f 402.145f 221.506f
800x448 My Camera 601.618 601.618 392.459 225.876
           
864x480 FTC 626.909f 626.909f 426.007f 236.834f
864x480 My Camera 644.059 644.059 425.96 241.591

I am not that familiar with running the calibration process or interpreting the results so my process may not have been ideal but it looks like my values are somewhat similar to the ones in the FTC files so most likely this PID could just be added as a new PID for the existing values.

I also found an interesting article that discusses the different C920 models. https://www.streamtechreviews.com/blog/c920-variations

Please let me know if there is additional data I should be trying to get.

BradDGit avatar Dec 15 '23 04:12 BradDGit

@texasdiaz

This has been added for consideration for the 9.1 release, currently targeted for January 2024. This issue will remain open until this work has been completed.

Is this still targeted for this month. Will the PID I referenced above also be included?

BradDGit avatar Jan 05 '24 04:01 BradDGit