# draw gt
cv2.rectangle(img, (gt[0], gt[1]), (gt[2], gt[3]), (0,255,0), 1)
The following error occurred while running:
The rectangle function in opencv453 is incompatible with floating-point data
terms of settlement:
It is OK to convert the two coordinate data types in the rectangle function to int
cv2.rectangle(img, (int(gt[0]), int(gt[1])), (int(gt[2]), int(gt[3])),(0,255,0), 1)
Read More:
- Solution of running error reporting attributeerror: ‘rectangle’ object has no property ‘normalized’
- Solution to error reporting in opencv4.0 compilation of logo-logo
- Error reporting of OpenCV and Darknet under Python 2.7
- Drawing function of GLUT
- “Typeerror: invalid dimensions for image data” in Matplotlib drawing imshow() function
- Anaconda Matplotlib drawing Chinese garbled solution
- Project files may be invalid appears when cmake compiles opencv3.1, and the debug additional dependency of the compiled opencv3.1 is at the end
- cv2.error: OpenCV(3.4.2) error: (-215:Assertion failed) !empty() in function ‘detectMultiScale‘
- Error reporting – the project directly introduces the error reporting and solution of. SCSS file
- Opencv’s imread() function returns null when reading images
- 1 vs20152017 + OpenGL to configure and draw a white rectangle
- Opencv problem: opencv error: assertion failed (! Empty()) in detectmultiscale
- Error when using OpenCV: use of unclared identifier ‘CV_ Bgr2rgb ‘solution
- Opencv perfect configuration strategy 2015 (win7 + opencv 2.4.9 + vs 2013)
- Solution of OpenCV library import error in Python 3
- Pytorch RuntimeError: Error(s) in loading state_ dict for Dat aParallel:.. function submit.py Solutions for reporting errors
- OpenCV error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor‘
- [opencv + openvino] opencv-vino4.5.1 + opencv contrib installation
- Anaconda installation opencv Python error solution