OptimizeWarning: Covariance of the parameters could not be estimated warnings.warn('Covariance of the parameters could not be estimated',
2024-12-10 14:29:38,215 :: Finished capturing calibration frames. Beginning calibration... 2024-12-10 14:29:38,215 :: FPS Limited to 30. 2024-12-10 14:29:38,215 :: Final FPS is 10. 2024-12-10 14:29:38,215 :: Beginning processing calibration frames... 2024-12-10 14:29:41,353 :: Done processing calibration frames. 2024-12-10 14:29:41,353 :: Finding peak region... 2024-12-10 14:29:41,459 :: Found peak region. 2024-12-10 14:29:41,460 :: Creating calibration image. 2024-12-10 14:29:41,795 :: Calibration image saved. 2024-12-10 14:29:41,902 :: Finished calibration. 2024-12-10 14:29:41,902 :: Beginning measuring... 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 128/128 [00:09<00:00, 13.29it/s] E:\Anaconda\anaconda\envs\respmon\lib\site-packages\scipy\optimize_minpack_py.py:906: OptimizeWarning: Covariance of the parameters could not be estimated warnings.warn('Covariance of the parameters could not be estimated', 2024-12-10 14:33:21,561 :: Capture closed.
When meeting this warning,nothing UI windows dispalay.After wating for half a minute,the project will be closed.Please help.
I'm going to guess this is because the camera image wasn't loading properly. The error is happening in the measurement step, and the covariance matrix is calculated as part of the PCA step. If all the points found in the keypoints step are colinear, this is the error you'd get. A common reason for that could be that there's no image (or an otherwise simple image that isn't producing a diverse enough set of points.
To debug - you can look at the points being passed in here and see if they're a reasonable set: https://github.com/kevroy314/respmon/blob/d1f9134a5a1df9f8e51f2746a59ec76cef7e8800/base.py#L400
I'm not maintaining this repo anymore, but hopefully that helps you get it up and running.
https://github.com/kevroy314/respmon/blob/d1f9134a5a1df9f8e51f2746a59ec76cef7e8800/base.py#L399 - This is probably the function throwing the error - so these points are the ones to look at, not the cov_mat. Apologies for any confusion.