Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

while running the script I got the following error #1

Open
Gargisingh11 opened this issue Jul 7, 2021 · 1 comment
Open

while running the script I got the following error #1

Gargisingh11 opened this issue Jul 7, 2021 · 1 comment

Comments

@Gargisingh11
Copy link

inside
Traceback (most recent call last):
File "trackCar.py", line 49, in
p = pyr_LK_Tracker(image, template, roi, num_layers, threshold, True)
File "/content/lucaskanade.py", line 81, in pyr_LK_Tracker
p = affineLKtracker(image, template_copy, roi_pyr, p, threshold, check_brightness)
File "/content/lucaskanade.py", line 26, in affineLKtracker
warp_img = equalize_light(warp_img.astype(int))
File "/content/commonutils.py", line 66, in equalize_light
image = cv2.cvtColor(image, cv2.COLOR_GRAY2BGR)
cv2.error: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/color.simd_helpers.hpp:94: error: (-2:Unspecified error) in function 'cv::impl::{anonymous}::CvtHelper<VScn, VDcn, VDepth, sizePolicy>::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::impl::{anonymous}::Set<1>; VDcn = cv::impl::{anonymous}::Set<3, 4>; VDepth = cv::impl::{anonymous}::Set<0, 2, 5>; cv::impl::{anonymous}::SizePolicy sizePolicy = (cv::impl::::SizePolicy)2u; cv::InputArray = const cv::_InputArray&; cv::OutputArray = const cv::_OutputArray&]'

Unsupported depth of input image:
'VDepth::contains(depth)'
where
'depth' is 4 (CV_32S)

@anubhavparas
Copy link
Owner

try changing the image input to np.float32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants