@balljames/calibration v2.6.0
BallJames Calibration
This React component makes it possible to perform camera calibration on images of a football pitch. The input for this component is the image, a model of the pitch (fullsize, futsal etc), an optional previous calibration and the type of camera. Whenever the enduser has finished with the calibration and is happy with the result, the calibration object will be saved. This object should be dumped in a file called calibration.json, which will serve as an input for BallJames to be able to process the video data.
Installation
npm -i @balljames/calibration styled-components
Note that @balljames/calibration has 1 peer dependency: styled-components. This is needed for correct functioning of the component.
Usage
import {Calibration, models} from '@balljames/calibration';
const TestComponent = () => {
const [calibration, setCalibration] = useState();
return (
<div class="containerDiv">
<Calibration model={models.FullPitchModel(68,105)} image={image} saveCalibration={setCalibration} cameraType="unknown"/>
</div>
)
}
parameter | meaning |
---|---|
model | The pitch model. This can be one of FullPitchModel, FutsalModel (6 points), FutsalModelTopOfBox (8 points including half circle at the top of the box) |
image | This should be a URL to an image. This can also be a data url |
saveCalibration | Method receiving the final calibration object |
cameraType | "unknown" or any other value received by BallJames |
previousCalibration (optional) | Any previous calibration can speed up a new calibration |
Changelog
version | changes |
---|---|
1.1.0 | First release version |
1.1.1 | New Futsal pitch model with 15 clickpoints (FutsalModel15). This model has an optional third parameter for the goalWidth which is 5m by default |
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago