|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: JavaCV and OpenCV Camera Calibration with sample code
25% is a pretty big difference.
The white paper contained a pretty full shot of the target. I attached it again below. The target doesn't go entirely to the edge of the screen, but pretty close. Quick measurements there on the rectangle have it at 200pixels on one vertical edge, 209 on the other, and 216 in the center. I honestly can say for sure which camera the shot was taken with any longer since I carry both in my bag. What camera were you measuring? Greg McKaskle |
|
#2
|
|||
|
|||
|
Re: JavaCV and OpenCV Camera Calibration with sample code
We are using Axis 1011.
Check out these images for comparison. One is the original, the other is after the correction. Look at the edges to see how many pixels off the edges are. When the image is up close, errors are insignificant (more pixels to get the distance). As the robot moves away from the hoops, the rectangle gets smaller in the frame, and moves towards the edges. Check out this radial shot and measure the pixels per cm between rings 1-2 and the pixels per cm between rings 7-8. |
|
#3
|
|||
|
|||
|
Re: JavaCV and OpenCV Camera Calibration with sample code
Suppose your camera was a somewhere in mid-field.
If the camera were looking directly at the backboard, that is, your rectangle is in the center of the field of view, then you would get a large reading for the pixel count, indicating you are close to the backboard. If the camera were looking off to the side, then your rectangle is at the edge of the field of view. The rectangle would be smaller by up to 25% in pixel count than at the center. Any calculation based on that smaller number would say that you are farther than you really are. The answer you get at the same distance depends on where the backboard is in the field of view. You can correct for that after the fact, or you can correct the image in the first place. We chose to correct the image. |
|
#4
|
|||
|
|||
|
Re: JavaCV and OpenCV Camera Calibration with sample code
I understand what calibration is and the benefits, but I had assumed that it was rather expensive, and not all that necessary.
Do you expect the robot to shoot at targets near the edge of the camera? Greg McKaskle |
|
#5
|
|||
|
|||
|
Re: JavaCV and OpenCV Camera Calibration with sample code
Depending on the robot's distance from the backboard, the rectangle moves up and down in the field of view. Also, depending on the tilt of the camera, the rectangle may be anywhere on a vertical line at the time of launch. We should be able to get the side to side alignment fairly close.
Some correction due to vertical placement seems to be required. Depending on the processing configuration, when this happens might change. If the cRio is doing the image work, it may be reasonable to do this correction after the fact. A coprocessor off the cRio may have enough cycles to correct up front, and simplify the geometric calculations. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|