Open sangramrajekakade opened 4 years ago
Traceback (most recent call last):
File "experiment.py", line 378, in
please help
python code2.py -i1 aman1.jpg -i2 aman2.jpg -i3 aman3.jpg -a True helllooooo <module 'cv2.cv2' from '/home/panacea/Documents/Yogeshsir/Body-Measurement-using-Computer-Vision/src/venv/lib/python3.5/site-packages/cv2/cv2.cpython-35m-x86_64-linux-gnu.so'> Traceback (most recent call last): File "code2.py", line 401, in <module> main() File "code2.py", line 376, in main metre_pixel_x,metre_pixel_y,coordinate,affine_correct_parameters=analyze_chessboard(image,affine_correct_flag) File "code2.py", line 230, in analyze_chessboard cv2.setMouseCallback(window_name1, click_and_crop) cv2.error: OpenCV(4.2.0) /io/opencv/modules/highgui/src/window_QT.cpp:714: error: (-27:Null pointer) NULL window handler in function 'cvSetMouseCallback'
@sangramrajekakade, simply add cv2.namedWindow(window_name1) before cv2.setMouseCallback(window_name1, click_and_crop)
Traceback (most recent call last): File "experiment.py", line 378, in main() File "experiment.py", line 341, in main metre_pixel_x,metre_pixel_y,coordinate,affine_correct_parameters=analyze_chessboard(image,affine_correct_flag) File "experiment.py", line 222, in analyze_chessboard clone = image.copy() AttributeError: 'NoneType' object has no attribute 'copy'
please help
@jayashreepalliyamakkal, replace clone = image.copy() with clone = np.copy(image)
python code2.py -i1 aman1.jpg -i2 aman2.jpg -i3 aman3.jpg -a True helllooooo <module 'cv2.cv2' from '/home/panacea/Documents/Yogeshsir/Body-Measurement-using-Computer-Vision/src/venv/lib/python3.5/site-packages/cv2/cv2.cpython-35m-x86_64-linux-gnu.so'> Traceback (most recent call last): File "code2.py", line 401, in <module> main() File "code2.py", line 376, in main metre_pixel_x,metre_pixel_y,coordinate,affine_correct_parameters=analyze_chessboard(image,affine_correct_flag) File "code2.py", line 230, in analyze_chessboard cv2.setMouseCallback(window_name1, click_and_crop) cv2.error: OpenCV(4.2.0) /io/opencv/modules/highgui/src/window_QT.cpp:714: error: (-27:Null pointer) NULL window handler in function 'cvSetMouseCallback'
@sangramrajekakade, simply add cv2.namedWindow(window_name1) before cv2.setMouseCallback(window_name1, click_and_crop)
python code2.py -i1 aman1.jpg -i2 aman2.jpg -i3 aman3.jpg -a True helllooooo <module 'cv2.cv2' from '/home/panacea/Documents/Yogeshsir/Body-Measurement-using-Computer-Vision/src/venv/lib/python3.5/site-packages/cv2/cv2.cpython-35m-x86_64-linux-gnu.so'> Traceback (most recent call last): File "code2.py", line 401, in <module> main() File "code2.py", line 376, in main metre_pixel_x,metre_pixel_y,coordinate,affine_correct_parameters=analyze_chessboard(image,affine_correct_flag) File "code2.py", line 230, in analyze_chessboard cv2.setMouseCallback(window_name1, click_and_crop) cv2.error: OpenCV(4.2.0) /io/opencv/modules/highgui/src/window_QT.cpp:714: error: (-27:Null pointer) NULL window handler in function 'cvSetMouseCallback'
@sangramrajekakade, simply add cv2.namedWindow(window_name1) before cv2.setMouseCallback(window_name1, click_and_crop)
It is not working...
cv2.error: opencv(4.6.0) d:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window_w32.cpp:1261: error: (-27:null pointer) null window: 'geeksforgeeks' in function 'cvdestroywindow'
solved by cv2.namedWindow("GeeksForGeeks") cv2.destroyWindow("GeeksForGeeks")