Open cmurray3 opened 7 months ago
import olab_camera
Traceback (most recent call last):
File "
same bug as btle1
Those of you were were getting an error, please do the following and share your output:
First, open a Python session:
python3
Now, import openCV and check the version:
import cv2
cv2.__version__
1) Please let me know the version number
Next, try the following from within your Python session (after importing cv2)
cv2.Tr # Now, start hitting the `tab` key a few times.
2) What auto-complete options are provided vor cv2.Tr
?
Similarly, try this:
cv2.legacy. # Note the trailing `.`. Start hitting `tab`
3) What auto-complete options are provided for cv2.legacy.
?
Just thought of another thing to check to help us fix this issue. From an Ubuntu terminal (not in Python), type the following:
pip3 show opencv-contrib-python
4) What is the output from that command?
1)cv2 version is 4.9.0 these are the options i have:
2)>>> cv2.Tracker cv2.Tracker( cv2.TrackerMIL_Params( cv2.TrackerDaSiamRPN( cv2.TrackerMIL_create( cv2.TrackerDaSiamRPN_Params( cv2.TrackerNano( cv2.TrackerDaSiamRPN_create( cv2.TrackerNano_Params( cv2.TrackerGOTURN( cv2.TrackerNano_create( cv2.TrackerGOTURN_Params( cv2.TrackerVit( cv2.TrackerGOTURN_create( cv2.TrackerVit_Params( cv2.TrackerMIL( cv2.TrackerVit_create(
3)there are no autocomplete options for cv2.legacy.
4)student@ubuntu:~$ pip3 show opencv-contrib-python Name: opencv-contrib-python Version: 4.9.0.80 Summary: Wrapper package for OpenCV python bindings. Home-page: https://github.com/opencv/opencv-python Author: None Author-email: None License: Apache 2.0 Location: /usr/local/lib/python3.8/dist-packages Requires: numpy, numpy Required-by:
Try the following:
sudo pip uninstall opencv-contrib-python
sudo pip uninstall opencv-python
sudo pip3 install opencv-contrib-python
Then, tell me what happens when running these commands:
python3
import cv2
cv2.TrackerCSRT_create()
Did those steps, this is what i get.
import cv2 cv2.TrackerCRST_create() Traceback (most recent call last): File "
", line 1, in AttributeError: module 'cv2' has no attribute 'TrackerCRST_create'
Just FYI, I went through a couple steps to get my VM to actually recognize my camera
Just FYI, I went through a couple steps to get my VM to actually recognize my camera
Could you post those steps, in case others are facing similar issues?
Did those steps, this is what i get.
import cv2 cv2.TrackerCRST_create() Traceback (most recent call last): File "", line 1, in AttributeError: module 'cv2' has no attribute 'TrackerCRST_create'
You have a typo. Please try this exactly:
import cv2
cv2.TrackerCSRT_create()
cv2.TrackerCSRT_create()
, not cv2.TrackerCRST_create()
1) 4.9.0
2) cv2.Tracker( cv2.TrackerGOTURN( cv2.TrackerKCF_Params( cv2.TrackerNano_create(
cv2.TrackerCSRT( cv2.TrackerGOTURN_Params( cv2.TrackerKCF_create( cv2.TrackerVit(
cv2.TrackerCSRT_Params( cv2.TrackerGOTURN_create( cv2.TrackerMIL( cv2.TrackerVit_Params(
cv2.TrackerCSRT_create( cv2.TrackerKCF( cv2.TrackerMIL_Params( cv2.TrackerVit_create(
cv2.TrackerDaSiamRPN( cv2.TrackerKCF_CN cv2.TrackerMIL_create(
cv2.TrackerDaSiamRPN_Params( cv2.TrackerKCF_CUSTOM cv2.TrackerNano(
cv2.TrackerDaSiamRPN_create( cv2.TrackerKCF_GRAY cv2.TrackerNano_Params(
3) cv2.legacy.MultiTracker( cv2.legacy.TrackerCSRT_create( cv2.legacy.TrackerMOSSE_create(
cv2.legacy.MultiTracker_create( cv2.legacy.TrackerKCF( cv2.legacy.TrackerMedianFlow(
cv2.legacy.Tracker( cv2.legacy.TrackerKCF_create( cv2.legacy.TrackerMedianFlow_create(
cv2.legacy.TrackerBoosting( cv2.legacy.TrackerMIL( cv2.legacy.TrackerTLD(
cv2.legacy.TrackerBoosting_create( cv2.legacy.TrackerMIL_create( cv2.legacy.TrackerTLD_create(
cv2.legacy.TrackerCSRT( cv2.legacy.TrackerMOSSE( cv2.legacy.upgradeTrackingAPI(
4) Name: opencv-contrib-python
Version: 4.9.0.80
Summary: Wrapper package for OpenCV python bindings.
Home-page: https://github.com/opencv/opencv-python
Author: None
Author-email: None
License: Apache 2.0
Location: /usr/local/lib/python3.8/dist-packages
Requires: numpy, numpy
Required-by:
Then after sudo uninstall, install open cv, etc.. < cv2.TrackerCSRT 0x7eff82f8cfd0>
https://arxiv.org/pdf/1908.01450 page 6 contains the following table:
The two attached Python scripts (
olab_camera.py
andolab_utils.py
) can be used for several image processing activities. One such activity is camera calibration.Unfortunately, I haven't had a chance to document the code...it's rather messy. Below is my attempt to explain how to run the camera calibration:
Installation
You may save the two
.py
scripts anywhere on your system. Thessl
directory should be saved in~/Projects
.Camera Calibration
The Python code below should be executed from the directory where you saved
olab_camera.py
andolab_utils.py
:IE_482_582_camera_code.zip